show/hide text, but more...

S

shimmyshack

Hi,

I know how to show and hide text, but I want to make it so that the
page shifts up when I hide my text. Right now with the simple code, it
only leaves a blank space.

Thanks,
Daniel

http://rail.blu-streak.com/galleries/system/1.php

scroll down to walks to see the show/hide buttons

instead of
e.style.visibility = 'hidden';
why not define a class in your css
..gone
{
visibility: hidden;
display: none;
}
and use
e.className = 'gone';

or check out one of the libraries for js effects, scriptaculous etc...
 
P

prince

Dan said:
Hi,

I know how to show and hide text, but I want to make it so that the
page shifts up when I hide my text. Right now with the simple code, it
only leaves a blank space.

Thanks,
Daniel


http://rail.blu-streak.com/galleries/system/1.php

scroll down to walks to see the show/hide buttons

Display:none removes the element from the layout.
visibility:hidden keeps the element in the layout but does not show
the content.

using Display:none to forces a realignment of the page layout creating
the effect you want.

HTH Prince
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top