Expand Layout
by merganser
HTML
<div id="container2">
<div id="container1">
<div id="col1">
<!-- Column one start -->
<h2>Equal height columns</h2>
<!-- Column one end -->
</div>
<div id="col2">
<!-- Column two start -->
<h2>Cross-Browser Compatible</h2>
<!-- Column two end -->
</div>
</div>
</div>
CSS
/* <!-- */
body {
margin:0;
padding:0;
}
#header h1,
#header h2,
#header p {
margin-left:2%;
padding-right:2%;
}
#active2 #tab2,
#active3 #tab3,
#active4 #tab4,
#active5 #tab5 {
font-weight:bold;
text-decoration:none;
color:#000;
}
#footer {
clear:both;
float:left;
width:100%;
}
#footer p {
margin-left:2%;
padding-right:2%;
}
/* Start of Column CSS */
#container2 {
clear:left;
float:left;
width:100%;
overflow:hidden;
background:red; /* column 2 background colour */
position:absolute;
bottom:0px;
top:0px;
left:0px;
right:0px;
}
#container1 {
float:left;
width:100%;
position:relative;
right:50%;
background:black; /* column 1 background colour */
}
#col1 {
float:left;
width:46%;
position:relative;
left:52%;
overflow:hidden;
background:yellow;
}
#col2 {
float:left;
width:46%;
position:relative;
left:56%;
overflow:hidden;
background:green;
}
/* --> */