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.

image margin<br />

paragraph border<br />

paragraph margin<br />

paragraph padding<br />

Some sample text in the first paragraph. It has a floating<br />

image that was right about here (X) in the<br />

source. However, the image is so large that<br />

it extends below the text of this paragraph.<br />

This paragraph has its ’clear’ propery set to ’left,’ so<br />

that it will be forced to be below any left−floating images.<br />

This is done by increasing its top margin.<br />

Both paragraphs have set ’clear: left’, which causes the second paragraph to<br />

be "pushed down" to a position below the float -- its top margin expands to<br />

accomplish this (see the ’clear’ property).<br />

9.5.1 Positioning the float: the ’float’ property<br />

’float’<br />

Value: left | right | none | inherit<br />

Initial: none<br />

Applies to: all but positioned elements and generated content<br />

Inherited: no<br />

Percentages: N/A<br />

Media: visual<br />

This property specifies whether a box should float to the left, right, or not at all.<br />

It may be set for elements that generate boxes that are not absolutely positioned<br />

[p. 113] . The values of this property have the following meanings:<br />

left<br />

The element generates a block [p. 97] box that is floated to the left. Content<br />

flows on the right side of the box, starting at the top (subject to the ’clear’<br />

property). The ’display’ is ignored, unless it has the value ’none’.<br />

right<br />

Same as ’left’, but content flows on the left side of the box, starting at the<br />

top.<br />

none<br />

The box is not floated.<br />

111

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

Saved successfully!

Ooh no, something went wrong!