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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24 px<br />

Document Window<br />

(0,0) (0, 400)<br />

1<br />

2<br />

3<br />

Start<br />

Beginning of body contents.<br />

of outer contents.<br />

= +12px Inner contents.<br />

End of outer contents.<br />

End of body<br />

= −12px<br />

4<br />

contents.<br />

5<br />

6<br />

7<br />

8<br />

(400, 0) (400, 400)<br />

Note also that had the offset of outer been ’-24px’, the text of outer and the<br />

body text would have overlapped.<br />

9.8.3 Floating a box<br />

Now consider the effect of floating [p. 108] the inner element’s text to the right by<br />

means of the following rules:<br />

#outer { color: red }<br />

#inner { float: right; width: 130px; color: blue }<br />

Text flows normally up to the inner box, which is pulled out of the flow and<br />

floated to the right margin (its ’width’ has been assigned explicitly). Line boxes to<br />

the left of the float are shortened, and the document’s remaining text flows into<br />

them.<br />

118

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

Saved successfully!

Ooh no, something went wrong!