sqlsurfing
12-22-2009, 08:10 PM
Hi
As far as I know, absolute positioning is relative to a containing block that provides a positioning context, which by default, is the <html> element. Thus, by default, absolute positioning should be specified with respect to the edges of <html> element.
For example, assuming <html> element contains an element E with width of 2000px, then the width of <html> element is around 2000px and thus the following code:
#abs
{
position: absolute;
top: 128px;
right: 0px;
width: 100px;
}
should place an element #abs to the far right of <html> element ( distance between far right and far left of the <html> is around 2000px ). In other words, #abs element should be visible ( on the right side of browser window ) only when horizontal scroll bars are scrolled to the far right of the document. Instead, #abs is visible ( on the right side of browser window ) when horizontal bars are scrolled to the far left of the document. What am I missing?
Thanx
As far as I know, absolute positioning is relative to a containing block that provides a positioning context, which by default, is the <html> element. Thus, by default, absolute positioning should be specified with respect to the edges of <html> element.
For example, assuming <html> element contains an element E with width of 2000px, then the width of <html> element is around 2000px and thus the following code:
#abs
{
position: absolute;
top: 128px;
right: 0px;
width: 100px;
}
should place an element #abs to the far right of <html> element ( distance between far right and far left of the <html> is around 2000px ). In other words, #abs element should be visible ( on the right side of browser window ) only when horizontal scroll bars are scrolled to the far right of the document. Instead, #abs is visible ( on the right side of browser window ) when horizontal bars are scrolled to the far left of the document. What am I missing?
Thanx