I have a basic 2-column layout with divs using the following html code:
<div ID="main">
<!-- body content -->
</div>
<div ID="sidepanel">
<!-- side content -->
</div>
and the following css code:
#main{
width:80%;
float:left;
overflow:hidden
}
#sidepanel{
width:18%;
float:right;
overflow:hidden
}
While the columns are done nicely for the most part, I have one problem. If my main content requires more than 80% of the screen width to be properly displayed, the remaining width is then clipped off. If I remove both overflow:hidden
items, then the side panel content overlaps the body content. The only way I can see everything properly in either case is to use the web browser zoom out feature or increase screen resolution.
With tables, I can simply use this setup with no CSS:
<table>
<tr>
<td>
<!-- body content -->
</td>
<td>
<!-- side content -->
</td>
</tr>
</table>
and everything works fine.
Overall, I'd like a horizontal scrollbar available instead of clipping if the content in the main body is too wide for the screen.
Anyone know how to fix this while still making it compatible with IE7 without having to resort to tables for layout?