Name

visibility

Values:

visible | hidden | collapse | inherit

Initial value:

inherit

Applies to:

All elements.

Inherited:

No.

Computed value:

As specified.

Description:

This specifies whether the element box generated by an element is rendered. This means authors can have the element take up the space it would ordinarily take up, while remaining completely invisible. The value collapse is used in tables to remove columns or rows from the table’s layout.

Examples:

ul.submenu {visibility: hidden;}
tr.hide {visibility: collapse;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.