I cannot seem to figure this out for the life of me.
I am using a basic table (Yes, stop looking at me like that) so that I can have equal height columns (3 of them).
The left and right are fixed width, the center is fluid.
I then have a div in the center that is set to 100% height but I want it to have a scrollbar so you don’t have to utlize the default browser scrollbar.
I set it to overflow: auto; along with height: 100%; but it ends up reaching the entire browser height (actually goes past it) and never uses the overflow scrollbar.
If I then add 1 more set of div tags and give THOSE 100% height and overflow: auto;, then IE runs the page PERFECTLY, but Firefox doesn’t.
In a nutshell, the page is setup like this
<td>
<div id="centercontent">
<div id="flow">
blah blah blah A LOT OF TIMES TO MAKE SCROLLBAR
</div>
</div>
</td>
So both Center Content and Flow have a height of 100% and overflow: auto;
IE treats the page great. Firefox doesn’t ever get the internal scrollbar.
Yes, it works in IE because of quirks mode, so I NEED to leave that alone and find an alternative to Firefox and/or other browsers.
Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
* {margin: 0px; padding: 0px;}
html, body {height: 100%;}
body {padding-right: 10px; padding-left: 10px;}
table#main {border-collapse: collapse; width: 100%; height: 100%;}
table#main td {vertical-align: top;}
td#leftcol {width: 240px;height: 100%;}
td#contentcol {width: 100%;height: 100%; background: #fff; padding-right: 10px; padding-left: 10px;}
td#rightcol {width: 250px;height: 100%; background: #666666;}
div#leftcontent {width: 240px; height: 100%;}
div#rightcontent {width: 250px; padding: 10px;}
div#centercontent {height: 100%;font-size: 12px;}
div#centercontent p {padding-top: 15px; padding-bottom: 15px; border-bottom: solid 1px #eee;}
#divChatForm {height: 80%; background: #ebf9ff; padding: 10px; border: solid 1px #c8e1ec; min-height: 240px;}
div#searchresults {padding: 10px 25px; overflow:auto; height: 100%; position:relative;}
#divChatForm #divChatArea {height: 80%; width: 100%; background: #fff; border: solid 1px #9cc3d3;}
.button {width: 150px; margin-top: 5px;}
div#header {padding: 15px 10px 10px 25px;}
div#logo {float: left; width: 110px; margin-right: 20px;}
div#search {float: left; width: 400px;}
table#searchbar {height: 100%;}
table#searchbar td#searchleft {width: 240px;height: 100%;}
div#footer {text-align: center; padding-top: 5px; padding-bottom: 5px; border-top: solid 1px #eee; margin-top: 10px;}
</style>
<!--[if IE]>
<link href="test-col-ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
<table id="main">
<tr>
<td colspan="3">
<div id="header">
<div id="logo"></div>
<div id="search">
</div>
<br clear="all" />
<div style="clear: both;"></div>
</div>
</td>
</tr>
<tr>
<td id="leftcol">
<div id="leftcontent">
<table id="searchbar">
<tr>
<td id="searchleft">
</td>
</tr>
</table>
</div>
</td>
<td id="contentcol">
<div id="centercontent">
<div id="searchresults">
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
<p><strong>Netscape 4, CSS layout, 3 columns with Header and Footer</strong><br />
Because of NN4's loss of styling information on resizing, the layout includes some javascript to force NN4 to reload which overcomes this bug ...
<a href="http://www.fu2k.org/alex/css/layouts/3Col_NN4_RWS_A.mhtml">www.fu2k.org/alex/css/...</a> - 12k - Cached - Similar pages</p>
</div>
</div>
</td>
<td id="rightcol">
<div id="rightcontent">Right Column</div>
</td>
</tr>
<tr>
<td colspan="3">
<div id="footer"></div>
</td>
</tr>
</table>
</body>
</html>
Remove the 3rd column and make it so the LEFT and RIGHT columns are 250px each, and the center column is fluid between the 2 WITH the scrollbar associated with it.
Paul, I wish I could say some cuss words (in a good way) to express my gratitude for what you have done. I know you didn’t test it much, but man, so far it works in IE, FF, Safari, and FF (mac).
Paul (who is probably on vacation) or anyone else.
Is there a workaround to the width: auto; for #left2, because in IE, it only displays the width based on the content, and I really need it to fit the same window that Firefox does when using width: auto;