CSS: Hide Element (visibility)

By Xah Lee. Date: .

A element can be hidden by:

visibility: visible
normal.
visibility: hidden
maket it invisible, but it still occupies the same space.
display: none
make invisible and occupies no space. (effectively as the element doesn't exist.)

These are useful especially when used together with JavaScript. For example, for collapsible list, popup tooltip.

[see How to Create Tooltip]

CSS Layout

CSS Layers

JavaScript Using Css Layers