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.

The properties of the run-in element are inherited from its parent in the source<br />

tree, not from the block box it visually becomes part of.<br />

Please consult the section on generated content [p. 156] for information about<br />

how run-in boxes interact with generated content.<br />

9.2.5 The ’display’ property<br />

’display’<br />

Value: inline | block | list-item | run-in | compact | marker | table |<br />

inline-table | table-row-group | table-header-group |<br />

table-footer-group | table-row | table-column-group |<br />

table-column | table-cell | table-caption | none | inherit<br />

Initial: inline<br />

Applies to: all elements<br />

Inherited: no<br />

Percentages: N/A<br />

Media: all<br />

The values of this property have the following meanings:<br />

block<br />

This value causes an element to generate a principal block box.<br />

inline<br />

This value causes an element to generate one or more inline boxes.<br />

list-item<br />

This value causes an element (e.g., LI in HTML) to generate a principal<br />

block box and a list-item inline box. For information about lists and examples<br />

of list formatting, please consult the section on lists [p. 168] .<br />

marker<br />

This value declares generated content [p. 153] before or after a box to be a<br />

marker. This value should only be used with :before and :after<br />

pseudo-elements [p. 153] attached to block-<strong>level</strong> elements. In other cases,<br />

this value is interpreted as ’inline’. Please consult the section on markers<br />

[p. 164] for more information.<br />

none<br />

This value causes an element to generate no boxes in the formatting structure<br />

[p. 25] (i.e., the element has no effect on layout). Descendant elements<br />

do not generate any boxes either; this behavior cannot be overridden by<br />

setting the ’display’ property on the descendants.<br />

Please note that a display of ’none’ does not create an invisible box; it<br />

creates no box at all. CSS includes mechanisms that enable an element to<br />

generate boxes in the formatting structure that affect formatting but are not<br />

visible themselves. Please consult the section on visibility [p. 149] for details.<br />

run-in and compact<br />

These values create either block or inline boxes, depending on context.<br />

Properties apply to run-in and compact boxes based on their final status<br />

(inline-<strong>level</strong> or block-<strong>level</strong>). For example, the ’white-space’ property only<br />

applies if the box becomes a block box.<br />

101

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

Saved successfully!

Ooh no, something went wrong!