if you only need two ( or 3) equal size boxes, this my own personal method of achieving this. The nice thing about it that that mark up structure allows me to switch to CSS: display table... easily.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<style>
.rowWrap { background:silver; width:960px; margin:0 auto; text-align:center; line-height:0}/*note this would be the color of your boxes*/
.row{ width:20px; background:#fff;display:inline-block; line-height:1; text-align:left}/* a fixed space between the boxes... there are other options that can be used, but lets keep it simple*/
.l, .r{ width:470px;}
.r{float:right; margin-right:-470px;}
.l{float:left; margin-left:-460px;}
</style>
</head>
<body>
<div class="rowWrap">
<div class="row">
<div class="box l">
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
</div>
<div class="box r">
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
</div>
<!--row--></div>
</div>
<!-- end pair of items -->
</body>
</html>
the down side.. IE.. is int always.. the fix is irksome , but not troublesome. This is more IE friendly, but requires ONE line of non-semantic mark up:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<style>
.rowWrap { background:silver; width:960px; margin:0 auto;}/*note this would be the color of your boxes*/
.row{ width:20px; background:#fff; margin:0 auto;}/* a fixed space between the boxes... there are other options that can be used, but lets keep it simple*/
.l, .r{ width:470px;}
.r{float:right; margin-right:-470px;}
.l{float:left; margin-left:-460px;}
.clear{clear:both}
</style>
</head>
<body>
<div class="rowWrap">
<div class="row">
<div class="box l">
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
</div>
<div class="box r">
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
<p>test</p>
</div>
<div class="clear"></div>
<!--row--></div>
</div>
<!-- end pair of items -->
</body>
</html>
Actually, this to accommodate IE6-7 that only gives inline-block to inline elements .. BLAST. however... I was working on a third version of this solution ( tho I cant recall it at the time) double bast!
Bookmarks