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

visibility


This property determines whether or not an element is visible. Possible values are hidden, visible, and inherit. Be aware that a hidden element still occupies its full canvas space, but because this property is often used in conjunction with z-index, this may not matter. The default value inherit specifies that an element inherits its visibility state from the element that contains it. CSS2 defines a collapse value for this property that is often used with table cells. This property is commonly accessed via JavaScript to show and hide page objects in a manner often dubbed DHTML (Dynamic HTML).

Examples


p {visibility: inherit;}
peek-a-boo {visibility: hidden;}

Browser and CSS Support Notes


CSS2
IE 4, 5, 5.5, 6
Nav 4, 4.5-4.8, 6, 7
Opera 4, 5, 6, 7

(X)HTML Elements
CSS Properties
Back: vertical-align Next: white-space
< Home | About | Chapters | Examples | Errata | Reference | Site Map >