Forum Moderators: not2easy
no standard way for making a DIV stretch to the full height of it's parent DIV?
What's wrong with height:100%;? ;)
I assume you're dealing with a situation that is slightly more complex than just making a regular div stretch to 100% of it's regular parent.
Post some code and we'll get you straight.
cEM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Sabetian</title>
<style type="text/css">
#leftColumn, #center, #rightColumn {
float:left;
height:100%;
}
#leftColumn, #rightColumn {
width:150px;
background:yellow;
}
</style>
</head>
<body>
<div id="container"><div id="leftColumn">leftColumn<br />leftColumn<br />leftColumn</div>
<div id="center">
center<br />
center<br />
center<br />
center<br />
center<br />
center<br />
center<br />
center<br />
center<br />
</div>
<div id="rightColumn">right<br />right<br />right<br />right<br />right<br />right<br />right</div>
</div>
</body>
</html>
The container stretches to the height of the longest child div, I want all of the child DIVs to stretch to the full height of the container.
I know about the faux columns trick but I want to achieve that layout w/o using any picture.
Aidin Sabetian