Tha's the way CSS's visibility is supposed to work.
You better set the display instead:
document.getElementById("span_2").style.display= "none";
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------
----- Original Message -----
From: "Adrian Lynch" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Monday, July 02, 2007 3:39 PM
Subject: OT - Gap when making element invisible
>I have three spans:
>
> <span id="span_1">1</span><br />
> <span id="span_2">2</span><br />
> <span id="span_3">3</span>
>
> Which gives me output:
>
> 1
> 2
> 3
>
> If I make the middle one invisible with script:
>
> document.getElementById("span_2").style.visibility = "hidden";
>
> It leaves a gap like so:
>
> 1
>
> 3
>
> How would I make that gap close up leaving me with:
>
> 1
> 3
>
> Adrian Lynch
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282708
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4