I tried to absolutely place an element at the bottom of the page (and not in the viewport). An element is a direct child BODY. You can imagine that a page contains a lot of content, so there is a scroll bar.
So something like this:
<body>
<img id="target" src="images/code.png" style="position:absolute;bottom:0;"/>
This places the image at the bottom of the viewport on top of existing content. However, as soon as I added the following css rule:
body{
position:relative;
}
The image has moved to the bottom of the page.
So, if BODYit is not a containing block of all elements, what is it?
In addition, I am sure that this is a problem, but I could not find an example with a detailed explanation of the problem and solution. Any pointers?
Rajat