May 06, 2021 CSS Reference Manual
The visibility property specifies whether an element is visible.
Tip: Even invisible elements take up space on the page. Use the "display" property to create invisible elements that do not occupy page space.
Default: | visible |
---|---|
Inherited: | yes |
Version: | CSS2 |
JavaScript syntax: | object .style.visibility="hidden" |
Value | Describe |
---|---|
visible | The default. The element is visible. |
hidden | Elements are not visible. |
collapse | When used in table elements, this value can be deleted by one row or column, but it does not affect the layout of the table. T he space occupied by rows or columns is left to other content. If this value is used on other elements, it is rendered as "hidden". |
inherit | Specifies that the value of the visibility property should be inherited from the parent element. |
The visix property is supported by all major browsers.
Note: Internet Explorer (including IE8) does not have a version that supports the property value "inherit" or "collapse".
Set the table element tocollapse
This example shows how to overlay table elements.
CSS tutorials: CSS Display andvisibility