By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

collapse part of page - Did it by mistake once, now i want to do it i cant

P: n/a
a short while ago i was playing arround with the <DIV tag and wanted some
text to dissapear - while i was doing this i had a situation where i could
hide the info i wantd to hide but it would move the rest of the page up to
take up the space.

for example

line 1
line 2
line 3
line 4
i managed to hide line 3 ended up with

line 1
line 2
line 4

at that time i wanted to end up with
line 1
line 2

line 4

NOW i want to do what i did by acciident and cant figure it out.

any help would be great
Oct 5 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
chris wrote:
a short while ago i was playing arround with the <DIV tag and wanted some
text to dissapear - while i was doing this i had a situation where i could
hide the info i wantd to hide but it would move the rest of the page up to
take up the space.

for example

line 1
line 2
line 3
line 4
i managed to hide line 3 ended up with

line 1
line 2
line 4

at that time i wanted to end up with
line 1
line 2

line 4

NOW i want to do what i did by acciident and cant figure it out.


Instead of:

theDiv.style.display = 'none' or '';

use:

theDiv.style.visibility = 'hidden' or 'visible';

--
Rob
Oct 5 '05 #2

P: n/a
chris said the following on 10/5/2005 12:39 AM:
a short while ago i was playing arround with the <DIV tag and wanted some
text to dissapear - while i was doing this i had a situation where i could
hide the info i wantd to hide but it would move the rest of the page up to
take up the space.

for example

line 1
line 2
line 3
line 4
i managed to hide line 3 ended up with

line 1
line 2
line 4

at that time i wanted to end up with
line 1
line 2

line 4

NOW i want to do what i did by acciident and cant figure it out.

any help would be great


elem.style.display = "none";

Follow-Up left at comp.lang.javascript, removed the wannabe
alt.comp.lang.javascript

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 5 '05 #3

P: n/a
aha got it - thanks

--

"RobG" <rg***@iinet.net.au> wrote in message
news:tT*****************@news.optus.net.au...
chris wrote:
a short while ago i was playing arround with the <DIV tag and wanted some
text to dissapear - while i was doing this i had a situation where i
could hide the info i wantd to hide but it would move the rest of the
page up to take up the space.

for example

line 1
line 2
line 3
line 4
i managed to hide line 3 ended up with

line 1
line 2
line 4

at that time i wanted to end up with
line 1
line 2

line 4

NOW i want to do what i did by acciident and cant figure it out.


Instead of:

theDiv.style.display = 'none' or '';

use:

theDiv.style.visibility = 'hidden' or 'visible';

--
Rob

Oct 5 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.