• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Space not releasing on toggle of divs

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
firoza limbada
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe this problem wouldn't happen if you use some CSS Reset lib.

More info:
http://developer.yahoo.com/yui/reset/
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic