Help - Search - Members - Calendar
Full Version: overflow:auto;
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
asmith
hi,

in php, with a while loop I'm printing out some tabular data. title first and like 30 words of the content.

Sometimes the title ot the content has a very long word, which makes the box they are in expand and it messes the page design.
So i put the title and content in a div like :

CODE
<div style="width:100%;overflow:auto;">
<h1>longtitleWithNoSpace</h1>
<p>contentwith longwords</p>
</div>


It works fine in FF and Opera. But not IE6. It acts like there's no overflow and still expands the width. Unless I make a specified width in pixels. So that IE works with it.

But I want to use 100% since there's no specified width.

Any way to fix this?
pandy
I don't know of any. Not that that was to much help. tongue.gif
Christian J
At least it seems to work in IE7. Does it help IE6 if the width is say 99%?

Or maybe you can add &shy-entities after say every 20 characters? But then you'll get line-breaks instead.

Or you can get the viewport width in px with javascript and specify for the DIV.
moo
Try width:auto (or not specifying a width at all). I've had similar issues that this has fixed before.
Dr Z
If you want width:100%; try specifying the body width as 100% also. As far as I can remember in IE6 html width is preset to 100% (but not necessarily in IE 7. (You can test this quick message - and my sanity, by going to www.web-zonez.com/screen).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.