absolute positioning

The box's position (and possibly size) is specified with the top, right, bottom, and left properties. These properties specify offsets with respect to the box's containing block. Absolutely positioned boxes are taken out of the normal flow. This means they have no impact on the layout of later siblings. Also, though absolutely positioned boxes have margins, they do not collapse with any other margins.

One can apply margins on a absolutely positioned box. Here we would get the same result with no margin and bottom:0 instead of top:100%.

In IE6, the yellow box is not painted across the viewport, instead it shrinkwraps around its content.

Reduce the height of the viewport until it shows a vertical scrollbar, then style body with:

	position: relative;

Style the yellow box with:

	top: 0;
	bottom: 0;
	height: auto;

Try These

Watch This


Check This

<div id="aqua">aqua</div> <div id="yellow">yellow</div> <div id="pink">pink</div>

Edit This

Use shift + enter to create new lines (even in Safari and Chrome).