Posted By

michellebracken on 08/18/11


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Visibility or Display?

 / Published in: CSS

On the surface both the CSS visibility and display properties seem to do the same thing, hide or show an element on the page. Beneath the surface they work differently.

  1. {visibility: hidden} – The element holds the space, but isn’t seen
  3. {display: none} – The element does not hold space. Other elements collapse to fill the space
  6. Most of the time you likely want to use display: none, unless your goal is to leave an empty open space on your page

Report this snippet  

You need to login to post a comment.