| Author |
Space not releasing on toggle of divs
|
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
I have built a jsp page with 4 divs that start off collapsed. The first div is holding the space on the page even thought the style is initialised as style= display: none. The space is always held on the first div regardless of the order. The other 3 release the space correctly. Below is an extract from the jsp page
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
|
Posting JSP source is not effective for diagnosing HTML and CSS issues. Please pare the example down to a size that only shows HTML and only shows the parts that are not working.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
I have posted the html code below - unfortunately this way the problem is not apparent. Only when using the same code in a jsp page does the problem occur where the space for the first div is not released. Please let me know if more information is required in order to assist .
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
|
Aside from the HTML being invalid (no head or body), are you actually saying that when you use a JSP that results in this exact same HTML that it exhibits the behavior, but that when you use a straight HTML page that results in the exact same HTML that it behaves differently? I find that hard to believe.
|
 |
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
I have attached a screen dump to illustrate the problem(will try emailing the attachment as I am struggling to attach it here). The html below is just an extract and in the full format does have header and body details. There is definotely a difference when the code is in a jsp page - I have tried the straight html to debug - but then the error doesnt occur. So this has me stumped as to why the jsp page would work differently
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
You can use View HTML in the browser to see what is being delivered to the browser. How does it differ from the "working" HTML page?
If the same HTML is being delivered to the browser, it will not matter whether it was hand-written or generated from a JSP -- the browser has no idea that a JSP was used.
|
 |
firoza limbada
Greenhorn
Joined: Feb 19, 2010
Posts: 11
|
|
I have found the problem - and it definitely behaves differently when used in a jsp page - which is why the html code did not show the same problem. Using a table tage directly within another table tag caused the additional space - but on the first instance only. The other 3 jspf includes had the same code - but no extra space was shown on the screen. Remove one of the table tags and the space goes away
|
 |
Filipi Zimermann
Greenhorn
Joined: Mar 26, 2008
Posts: 21
|
|
Maybe this problem wouldn't happen if you use some CSS Reset lib.
More info:
http://developer.yahoo.com/yui/reset/
|
 |
 |
|
|
subject: Space not releasing on toggle of divs
|
|
|