The values of this property have the following meanings:
The box is a normal box, laid out according to the normal flow. The 'left' and 'top' properties do not apply.
The box's position is calculated according to the normal flow (this is called the position in
normal flow). Then the box is offset relative to its normal position. When
a box B is relatively positioned, the position of the following box is
calculated as though B were not offset.
The box's position (and possibly size) is specifie
with the 'left',
and 'bottom' properties.
These properties specify offsets with respect to the box's
containing block. Absolutely
positioned boxes are taken out of the normal flow. This mean
they have no impact on the layout of later siblings. Also,
though absolutely positione
boxes have margins, they
do not collapse
with any other margins.
The box's position is calculated according to the 'absolute'
model, but in addition, the box is fixed with respect to some reference. In
the case of continuous
media, the box is fixed with respect to the viewport (and doesn't move when scrolled). In
the case of paged media,
the box is fixed with respect to the page, even if that page is seen
through a viewport (in the case of a
print-preview, for example). Authors may wish to specify 'fixed' in a
media-dependent way. For instance, an author may want a box to remain
at the top of the viewport on the screen, but
not at the top of each printed page. The two specifications may be
separated by using an @media
rule, as in:
This property specifies how far a box's left content edge is offset
to the right of the left edge of the box's containing block.
The values for the four properties have the following meanings:
The offset is a fixed distance from the reference edge.
The offset is a percentage of the containing block's width (for 'left' or 'right') or height (for 'top' and 'bottom'). For 'top' and 'bottom', if the height of the containing block is not specified explicitly (i.e., it depends on content height), the percentage value is interpreted like 'auto'.
The effect of this value depends on which of related properties have the value 'auto' as well. See the sections on the width and height of absolutely positioned, non-replaced elements for details.
For absolutely positioned boxes, the offsets are with respect to the box's containing block. For relatively positioned boxes, the offsets are with respect to the outer edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties).