[Javascript] div visibility
dlovering at gazos.com
dlovering at gazos.com
Thu Mar 24 18:19:25 CST 2005
I use style.display in Netscape 7.5 without any issues, so apparently it is
somewhat sensitive to revision levels. [I've talked to a colleague who was
visiting one of my sites using this code while using a Netscape 7.2 browser,
and he didn't report any abnormal behavior, so perhaps it is not as bad as
Peter lets on. Or maybe my colleague isn't very observant...]
-- Dave Lovering
Quoting Peter Brunone <peter at brunone.com>:
>
> 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
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Javascript
mailing list