[Javascript] div visibility

Peter Brunone peter at brunone.com
Wed Mar 23 13:48:54 CST 2005


   style.visibility merely makes the element visible or invisible.  It still takes up the same amount of screen space; this can been seen when you use relatively positioned (inline) elements.

   style.display actually makes the element stop displaying, i.e. it disappears and there's no trace of its existence.  The one problem I've seen with this is that Netscape 7 doesn't seem to support the display property.

Cheers,

Peter

 From: "Dash" <forgetful54341087097153001984 at hotmail.com>
Sent: Wednesday, March 23, 2005 12:46 PM
To: javascript at LaTech.edu
Subject: [Javascript] div visibility 

 I was just reading the "replace element with another element on click" thread, and i saw you were changing the 'display' style of the div, I've always used the CSS 'visibility'of the element to show and hide things. Does anyone know what the difference is and which one (if any) is better to use when showing or hiding a div?     thanks,     Dash 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050323/1b27c7f3/attachment.htm>


More information about the Javascript mailing list