timjs
12-07-2006, 04:01 PM
Hi.
My first post, be nice!
I'm having trouble with the CSS Liquid Layout #2.1- (Fixed-Fluid) (http://www.dynamicdrive.com/style/layouts/item/css-liquid-layout-21-fixed-fluid/).
I have a table in the contentcolumn / innertube area that I would like to stretch to the full available width in that area. To achieve this I have set the table's width attribute to 100%. This works fine, until I begin to narrow the window's width. The left column begins to creep to the right as I narrow the window beyond a certain point. This point is the minimum width that the table can collapse to, based on the contents of its cells.
The problem happens in IE6, not in FF.
I dont want the left column to creep.
Does anyone have a solution to this?
Here is my code:
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test</title>
<style type="text/css">
body{
margin:0;
padding:0;
line-height: 1.5em;
}
b{font-size: 110%;}
em{color: red;}
#topsection{
background: #EAEAEA;
height: 90px; /*Height of top section*/
}
#topsection h1{
margin: 0;
padding-top: 15px;
}
#contentwrapper{
float: left;
width: 100%;
}
#contentcolumn{
margin-left: 200px; /*Set left margin to LeftColumnWidth*/
}
#leftcolumn{
float: left;
width: 200px; /*Width of left column*/
margin-left: -100%;
background: #C8FC98;
}
#footer{
clear: left;
width: 100%;
background: black;
color: #FFF;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFFF80;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}
</style>
</head>
<body>
<div id="maincontainer">
<div id="topsection">
<div class="innertube">
<h1>Stuff</h1>
</div>
</div>
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube">
<table width="100%" border="1px">
<tr>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
</tr>
</table>
</div>
</div>
</div>
<div id="leftcolumn">
<div class="innertube">
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
</div>
</div>
<div id="footer">
<p>stuff</p>
</div>
</div>
</body>
</html>
I hope someone can help!
Thanks,
Tim
My first post, be nice!
I'm having trouble with the CSS Liquid Layout #2.1- (Fixed-Fluid) (http://www.dynamicdrive.com/style/layouts/item/css-liquid-layout-21-fixed-fluid/).
I have a table in the contentcolumn / innertube area that I would like to stretch to the full available width in that area. To achieve this I have set the table's width attribute to 100%. This works fine, until I begin to narrow the window's width. The left column begins to creep to the right as I narrow the window beyond a certain point. This point is the minimum width that the table can collapse to, based on the contents of its cells.
The problem happens in IE6, not in FF.
I dont want the left column to creep.
Does anyone have a solution to this?
Here is my code:
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test</title>
<style type="text/css">
body{
margin:0;
padding:0;
line-height: 1.5em;
}
b{font-size: 110%;}
em{color: red;}
#topsection{
background: #EAEAEA;
height: 90px; /*Height of top section*/
}
#topsection h1{
margin: 0;
padding-top: 15px;
}
#contentwrapper{
float: left;
width: 100%;
}
#contentcolumn{
margin-left: 200px; /*Set left margin to LeftColumnWidth*/
}
#leftcolumn{
float: left;
width: 200px; /*Width of left column*/
margin-left: -100%;
background: #C8FC98;
}
#footer{
clear: left;
width: 100%;
background: black;
color: #FFF;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFFF80;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}
</style>
</head>
<body>
<div id="maincontainer">
<div id="topsection">
<div class="innertube">
<h1>Stuff</h1>
</div>
</div>
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube">
<table width="100%" border="1px">
<tr>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
<td>Some text</td>
</tr>
</table>
</div>
</div>
</div>
<div id="leftcolumn">
<div class="innertube">
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
<p>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff </p>
</div>
</div>
<div id="footer">
<p>stuff</p>
</div>
</div>
</body>
</html>
I hope someone can help!
Thanks,
Tim