This topic has not yet been rated - Rate this topic

Element visibility

The visibility of a positioned element determines whether the user can see the element. Visibility is useful for temporarily hiding an element, which you might want to do when, for example, a script needs time to calculate the element position or display simple transition effects.

You can set the visibility by using the visibility property. The following example uses the visibility property to make the DIV element invisible:

<p>A paragraph above the div element</p> 
<div id="Mydiv" style="position: absolute; top: 50px; 
    left: 50px; height: 100px; width: 100px; 
    visibility: hidden;"></div>
<p>A paragraph below the div element</p>

An element that is not visible continues to affect the space in the document layout that the element would occupy even though that space is empty. This is unlike the display property, which does not affect the space in a document layout.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.