HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

display


This property specifies an element's display type and can override an element's defined display type. For example, block-level elements can be redefined as inline elements so that extra lines will not be placed between them. The allowed values for display under CSS1 are inline, block, list-item, and none. The value of none completely removes an element from the document tree and unlike the hidden value of the visibility property, none does not preserve an element's canvas space.

CSS2 adds


run-in, compact, marker, table, inline-table, table-row-group, table-header-group, table-footer-group, table-row, table-column-group, table-column, table-cell, and table-caption.

Examples


p {display: inline;}
b {display: block;}
.removed {display: none;}

Browser and CSS Support Notes


CSS1
IE 4, 5, 5.5, 6
Nav 4, 4.5-4.8 (buggy), 6, 7
Opera 5, 6, 7

TIP While the display property itself is generally implemented, most of the CSS2 display properties are not widely supported.

(X)HTML Elements
CSS Properties
Back: direction Next: empty-cells
< Home | About | Chapters | Examples | Errata | Reference | Site Map >