{top:} Top Property - CSS Property Reference :: webDev

{top:}


						top: { length | percentage | auto | inherit } ;
					

For absolutely positioned boxes, the {top:} property specifies how far the top margin edge of the box is offset below the top padding edge of its containing block. However, should the value {top:} top be {auto;} (the initial value), the top margin edge of the box will be positioned at the top content edge of its containing block.

For relatively positioned boxes, the {top:} property specifies how far the top edge of the box is offset below the position it would have had in the normal flow.

Internet Explorer for Windows versions up to and including 6:

  • compute percentage values on the basis of the height of the parent block, rather than of the containing block
  • don’t support the specification of both the position and the dimensions of an absolutely positioned element using {top:}, {right}, {bottom}, and {left} together; they’ll use the last vertical and horizontal position specified, and need the dimensions to be specified using width and height.

Internet Explorer for Windows versions up to and including 7 don’t support the value {inherit}.

{top:} Top Property - CSS Property Reference :: webDev