• 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

div 'overflow:auto;' css question...

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok I have a 'Content' div inside a td of a table. That content div's width and height are set to 100% of that td's width and height.
Inside the 'Content' div I have two additional div's; 'GuildInfo' and 'Comments'. 'GuildInfo' has static text that will be the same wrote
directly in the html. 'Comments' however is fed it's contents via php from different comment files from different users.

'Comments' overflow is set to 'auto', but when the text inside the 'Comments' div (even though it's set to auto) gets longer than the 'Content' div, it makes
it expand in both IE and FF.

How can I resolve this? instead of using %'s should I use absolute 'px' width and height for the two div's 'Comments' and 'GuildInfo'?

Oh yea, 'Comments' and 'GuildInfo' both have a width of 100% of the 'Content' div and a height of 47% of the 'Content' div.

Thanks,

Justin
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Width and height must be fixed for overflow to work as you expect.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cool, I guess I just thought it was working correctly because I didnt have enough text in the div yet.

Thanks again!

Justin
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic