I don’t know of any simple or straightforward way to do this other than with JavaScript (or bg image, of course). But Paul O’B has some methods for equal height columns that might be of use:
I was thinking that I might be able to use one of the table layout properties to make it work.
I can’t use a background image because I’m giving the user the ability to change the width of the columns on the fly, so I would not know where to position the background image when the left column width changes from the width measured for the divider line.
Yes, that should work too, as long as IE7 and below can safely be ignored. The border is probably not essential anyhow, so personally I wouldn’t worry about those browsers.
I’m not sure if this is what you meant but I use this trick all the time for a dividing border between two floats.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.wrap {
width:602px;
border:1px solid #000;
overflow:hidden;
margin:0 auto 10px;
}
.box1 {
float:left;
border-right:1px solid #000;
width:300px;
}
.box2 {
float:left;
border-left:1px solid #000;
width:300px;
margin-left:-1px;
}
p {
margin:0 0 1em;
padding:0 10px;
}
</style>
</head>
<body>
<div class="wrap">
<div class="box1">
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
</div>
<div class="box2">
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
</div>
</div>
<div class="wrap">
<div class="box1">
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
</div>
<div class="box2">
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
<p>Lorem ipsum text</p>
</div>
</div>
</body>
</html>