torahanjyuu
08-04-2010, 05:55 AM
I am trying to define two DIVs that will both be as tall as the tallest element. However, the DIV that contains both of these elements needs to be able to expand with content.
The simplified HTML is as follows:
<html>
<body>
<div id="wrapper">
<div id="menu"></div>
<div id="content"></div>
</div>
</body>
</html>
What CSS can I use to make both the menu and the content DIVs the same height? The following code almost works, except that the wrapper DIV does not expand with content:
html, body {
height: 100%;
}
#wrapper {
float: left;
height: 100%;
}
#menu {
float: left;
min-height: 100%;
}
#content {
float: left;
min-height: 100%;
}
Changing the wrapper's 'height' tag to 'min-height' breaks the whole thing.
Any thoughts? Can you help me? I appreciate your help!
The simplified HTML is as follows:
<html>
<body>
<div id="wrapper">
<div id="menu"></div>
<div id="content"></div>
</div>
</body>
</html>
What CSS can I use to make both the menu and the content DIVs the same height? The following code almost works, except that the wrapper DIV does not expand with content:
html, body {
height: 100%;
}
#wrapper {
float: left;
height: 100%;
}
#menu {
float: left;
min-height: 100%;
}
#content {
float: left;
min-height: 100%;
}
Changing the wrapper's 'height' tag to 'min-height' breaks the whole thing.
Any thoughts? Can you help me? I appreciate your help!