Help - Search - Members - Calendar
Full Version: width:100%, Overflow:auto;
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
asmith
Hi,

I've searched the web for this but I couldn't find what I was looking for.

My whole site width is 100% and the content stretch itself to fit the browser width.
In the main content area I have this div:

CODE
<div style="width:100%; overflow:auto;">
<table width="100%">
.
.
.
</table>
</div>


Sometimes the content width in the table is more than the page width so it force browser to have a horizontal scroll.
I simple want the div to get horizontal scroll and leave the browser in peace smile.gif

the inline style for the div only works in FF2 and no other browser.
I guess I can achieve it by iframe (not sure though), But I really rather not go using iframes.

How can I do this?
Hopefully it is possible smile.gif
Christian J
Works for me. Can you post a real sample?
asmith
Yea sorry my bad. The whole thing is in a table td and I can't change the mother table.

The code is this:

CODE

<table width="100%" align="center">
<tr><td width="80%">

<div style="width:100%; overflow:auto;">
<table width="100%">
.
.
.
</table>
</div>

</td>
<td></td></tr>
</table>


Please tell me there's a fix for that mellow.gif
Christian J
Giving the outer table "table-layout: fixed" seems to help.
asmith
It worked!!!!!!!!! + I learned something new biggrin.gif
Bravo!!

Thanks biggrin.gif
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-2009 Invision Power Services, Inc.