display

Specifies how to display the element.

Platform Support

IENetscapeMozillaOperaSafari
5.0+4.0+1.0+5.0+1.3.2+
  • IE: Support on IE 5/6 is incomplete. Support is almost complete on IE 7, beta 3. Compatibility depends only on the values block, inline, none, inline-block, and list-item.
  • Mozilla: Support on Firefox is incomplete. Compatibility depends only on the values block, inline, none, inline-block, and list-item.

Usage

[display-type-value]

Values

inheritInherit the value from the parent element.
inlineDisplay the element as one or more inline boxes.
blockDisplay the element as a block box.
inline-blockDisplay the element as an inline block box.
list-itemDisplay the element as a block box and inline list item box.
run-inDisplay an element as a block or inline box, depending on the context.
compactDisplay an element as a block or inline box, depending on the context.
markerSpecifies that generated content before or after a box is a marker.
inline-tableSpecifies that the element should be treated like a table element.
table-row-groupSpecifies that the element should be treated like a table row group.
table-header-groupSpecifies that the element should be treated like a table header group.
table-footer-groupSpecifies that the element should be treated like a table footer group.
table-rowSpecifies that the element should be treated like a table row.
table-column-groupSpecifies that the element should be treated like a table column group.
table-columnSpecifies that the element should be treated like a table column.
table-cellSpecifies that the element should be treated like a table cell.
table-captionSpecifies that the element should be treated like a table caption.
tableSpecifies that the element should be treated like a table.
noneSpecifies that the element should generate no boxes.

Example

For a demonstration of the display attribute and its values, see the demo page on quirksmode:

http://www.quirksmode.org/css/display.html

Availability

W3C CSS2

Related

text_css aptana_docs