- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI have a CSS based layout.
heres the code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtm
<html xmlns="http://www.w3.org/1
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="layout.css" />
<title>CSS layout: Bordered 3 col fixed width with header and footer</title>
<style type="text/css">
div
{
border: 1px solid black;
}
div#header
{
width: 700px;
}
div.content-sub
{
float: left;
min-height: 100%;
}
div#content-sub-1
{
width: 198px;
}
div#content-sub-2
{
width: 300px;
}
div#content-sub-3
{
width: 198px;
clear:right;
height: 100%;
}
div#footer
{
clear:both;
width: 700px;
}
#wrapper{
width:702px;
border:1px solid green;
}
.spacer {
border:0px;
height:0px;
clear:both;
width:0px;
}
</style>
</head>
<body>
<div id="header">
<h1>header</h1>
</div>
<div id="wrapper">
<div class="content-sub" id="content-sub-1">
<h2>content-1</h2>
<p>The all three columns should be surrounded by a border, like in this </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</div>
<div class="content-sub" id="content-sub-2">
<h2>content-2</h2>
<p>See the </p>
</div>
<div class="content-sub" id="content-sub-3">
<h2>content-3</h2>
<p>The all three columns should be </p>
<p>The all three columns should be surrounded by a border, like </p>
</div>
<div class="spacer"></div>
</div>
<div id="footer">
<h2>footer</h2>
<p>It is important that all three columns, not only the center one, pushes the footer down.</p>
</div>
</body>
</html>
Now the problem is i need column 2 and three to stay the same height as each other no matter what the content in either is.
so if column two has more content column three must be the same height.
Basically columns 2 and three have to be glued to the footer.
Any suggestions!
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: ljo8877Posted on 2006-04-25 at 13:57:46ID: 16538513
This is one of the pitfalls of CSS design and there are many solution one can google. The problem is in supporting different and older browsers.
The easiest way is to create an image of column 2 and 3' s background and side borders used as background for wrapper positioned right and repeat-y. The image be 1 pixil tall and is as wide as the widths and borders of column 2 and 3. The columns cannot have any borders.
This way when either column grows the wrapper will grow and the background image will grow giving the illusion that the columns are the same height.
Set the wrapper background color to column 1. In IE 5.0 links can cause a problem so columns 2 and 3 should have their background colors set appropriately.