Advertisement

11.09.2005 at 07:40AM PST, ID: 21624881
[x]
Attachment Details

Hide and show DIV tags in table

Asked by Jon500 in Cascading Style Sheets (CSS)

Tags: div, hide, tag, show

Using: IE 6.x

Hi,

I have a couple of DIV tags that start out with a visibility of "hidden". The problem is that they are hidden but they are creating unwanted whitespace in the page layout. Let me explain as briefly as possible using a simpler example:

Imagine an HTML table with a DIV tag below it. After the DIV tag is some text:

-----------
|           |
-----------
<Div>
Text

I start the page with the DIV tag set to visibility:hidden. However, since the DIV tag content is about 100px high, there is white space between the table and the Text! When I make the DIV tag appear, it fits nicely in the space that's been allocated to it.

The problem is that I'm using absolute positioning to bring the DIV tag's content into the table. Thus, when I show it, it correctly appears in the table--but the white-space it created between the table and the text is still there!

I have tried all sorts of combinations of placing the DIV tag in a row within the table and then setting the height of the table to "0"--and all sorts of other ideas, to no avail.

Just so you know, all I'm trying to do is to have a table cell into which I can hide/show various content, depending on what selections are made above in the web page. Thus, if a user clicks the otpion button that says "order form" then some fields will appear; if they choose "rebate form", other fields would appear, etc. It is a dynamic form that is rendered using Javascript and CSS.

Any ideas would  be most appreciated.

Thanks!
-- Jon500Start Free Trial
 
Loading Advertisement...
 
[+][-]11.09.2005 at 07:42AM PST, ID: 15256969

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Tags: div, hide, tag, show
Sign Up Now!
Solution Provided By: Gertone
Participating Experts: 1
Solution Grade: A
 
 
[+][-]11.09.2005 at 07:44AM PST, ID: 15257001

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 08:25AM PST, ID: 15257449

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 08:48AM PST, ID: 15257733

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 09:01AM PST, ID: 15257877

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 09:04AM PST, ID: 15257914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 09:18AM PST, ID: 15258030

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 09:31AM PST, ID: 15258141

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 10:36AM PST, ID: 15258719

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 01:13PM PST, ID: 15260529

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 01:19PM PST, ID: 15260590

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 02:04PM PST, ID: 15261034

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.09.2005 at 03:21PM PST, ID: 15261616

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32