1. Home
  2. Computing & Technology
  3. Web Design / HTML

visibility

By Jennifer Kyrnin, About.com

visibility Description:

The visibility property defines whether the boxes generated by an element are displayed. Invisible boxes will still affect layout.

visibility in CSS Versions:

visibility Syntax:

visibility: visible | hidden | collapse | inherit

  • visible
    The generated box is visible.
  • hidden
    The generated box is invisible but still affects layout.
  • collapse
    The same as hidden, unless referring to table columns or rows.
  • inherit
    The element should have the same visibility value as the parent element.

visibility Initial Value:

visible

visibility Applies To:

All elements.

visibility Inheritance:

This property is inherited.

visibility Browser Support:

visibility Media Type:

  • Visual

visibility Examples:

Standard visibility property

<p style="visibility:hidden;">
Hide this paragraph, but the box will still take up space.
</p>

visibility Special Notes:

  • Be sure to test this in various browsers, as some user-agents have different effects.

More visibility Information

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: visibility

©2008 About.com, a part of The New York Times Company.

All rights reserved.