22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Values have the following meanings when applied to non-floating block boxes:<br />

left<br />

The top margin of the generated box is increased enough that the top border<br />

edge is below the bottom outer edge of any left-floating boxes that resulted<br />

from elements earlier in the source document.<br />

right<br />

The top margin of the generated box is increased enough that the top border<br />

edge is below the bottom outer edge of any right-floating boxes that resulted<br />

from elements earlier in the source document.<br />

both<br />

The generated box is moved below all floating boxes of earlier elements in<br />

the source document..<br />

none<br />

No constraint on the box’s position with respect to floats.<br />

When the property is set on floating elements, it results in a modification of the<br />

rules [p. 112] for positioning the float. An extra constraint (#10) is added:<br />

The top outer edge [p. 82] of the float must be below the bottom outer edge<br />

of all earlier left-floating boxes (in the case of ’clear: left’), or all earlier<br />

right-floating boxes (in the case of ’clear: right’), or both (’clear: both’).<br />

9.6 Absolute positioning<br />

In the absolute positioning model, a box is explicitly offset with respect to its<br />

containing block. It is removed from the normal flow entirely (it has no impact on<br />

later siblings). An absolutely positioned box establishes a new containing block<br />

for normal flow children and positioned descendants. However, the contents of<br />

an absolutely positioned element do not flow around any other boxes. They may<br />

or may not obscure the contents of another box, depending on the stack <strong>level</strong>s<br />

[p. 125] of the overlapping boxes.<br />

References in this specification to an absolutely positioned element (or its box)<br />

imply that the element’s ’position’ property has the value ’absolute’ or ’fixed’.<br />

9.6.1 Fixed positioning<br />

Fixed positioning is a subcategory of absolute positioning. The only difference is<br />

that for a fixed positioned box, the containing block is established by the viewport<br />

[p. 96] . For continuous <strong>media</strong> [p. 79] , fixed boxes do not move when the document<br />

is scrolled. In this respect, they are similar to fixed background images<br />

[p. 188] . For paged <strong>media</strong> [p. 175] , boxes with fixed positions are repeated on<br />

every page. This is useful for placing, for instance, a signature at the bottom of<br />

each page.<br />

Authors may use fixed positioning to create frame-like presentations. Consider<br />

the following frame layout:<br />

113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!