With display, you can remove elements from display (display: none), but there is another way to make elements invisible. The visibility property doesn't remove elements, but makes them completely transparent. In other words, if you set visibility to hidden, you see an empty space where the element is supposed to be. This is most useful if you have multiple alternative style sheets for the same page, or if you have a script that changes the style. You can use it to selectively show the answers to a quiz (for example, while keeping everything else on the page the same). The value visible makes elements visible, hidden makes them transparent. The property actually has a third value, collapse, which can make table columns disappear, but we won't discuss it here (refer to the CSS2 specification for an explanation). |