Changes

Jump to: navigation, search

CSS GUIDE VISIBILITY

2,547 bytes added, 23:08, 6 December 2006
no edit summary
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
== Summary ==

The visibility property specifies whether the boxes generated by an element are rendered, hidden, or collapsed. Except for one exception (described below), the layout of the page is still affected by invisible boxes.

<table border="0">
<tr>
<td><b>Applicability:</b></td><td>The visiblity property can be used for all CSS elements.<td>
</tr>
<tr>
<td><b>[http://www.w3.org/TR/CSS21/media.html#visual-media-groups Media Group:]</b>
</td><td>Visual</td>
</tr>
<tr>
<td><b>Inherited:</b></td><td>Yes</td>
</tr>
</table>

== Syntax ==
<pre>
TARGET_ELEMENT{ visibility: visible|hidden|collapse }
</pre>

== Legal Values ==

The legal values of the visiblity property are:
* '''visible''': The box generated by the element is visible.
* '''hidden''': The box generated by the element is invisible however the layout of the page is still affected.
* '''collapse''': For the row, row group, column, and column group elements, this value causes the entire row or column to be removed from the display. Unlike the hidden value, it does not affect the layout as other content can be placed where the row or column data would normally be. If used on any other element, the collapse value has the same meaning as the hidden value.

== Mozilla Recommended Values ==

== Usage Examples==

/* Set the visibility to visible */
p { visibility: visible }

/* Set the visibility to hidden */
p { visibility: hidden }

/* Set the visibility to collapse */
p { visibility: collapse }

== Notes ==

Even though an element's visibility is hidden and not drawn on the screen, the layout is still affected. If an element's visiblity is hidden, the descendents of the element will be visible if they have their visibility set to visible.

For the row, row group, column, and column group elements, the collapse value causes the entire row or column to be removed from the display. Unlike the hidden value, it does not affect the layout as other content can be placed where the row or column data would normally be. If the collapse value is used on any other element, the collapse value has the same meaning as the hidden value.

== Specification Conformance ==
* [http://www.w3.org/TR/CSS21/visufx.html#visibility CSS 2]
* [http://www.w3.org/TR/css3-box/#the-visibility CSS 3]

== Browser Compatibility ==

== See Also ==
1
edit

Navigation menu