elmu
05-24-2005, 10:09 AM
Hello,
I want to make a default 2 columns web site layout. But I want to use different background colors for the menu and for the content area.
Is it anyhow possible to make the height of two div tags for the same? Or any other trick to make the "gray" are full along the "white" area?
Here is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body{
background: #adb2bd;
margin: 0px;
padding:0px;
}
#menuback {
position:absolute;
background: #ccc;
width:100px;
text-align:top;
border: 0px solid #000;
border-left-width:1px;
border-right-width:1px;
}
#caption {
background: #fff;
padding-left:102px;
width:300px;
border: 0px solid #000;
border-right-width:1px;
text-align:top;
}
#content {
width:400px;
margin:auto;
margin-top:20px;
text-align:center;
}
</style>
</head>
<body>
<div id="content">
<div id="menuback"><ul><li>menu</li><li>menu</li><li>menu</li></ul></div>
<div id="caption"><h2>Caption</h2><p>Some text here</p><p>And much more text</p>
<p>and text and text and text</p> <p>and text and text and so on...</p><p> </p></div>
</div>
</body>
</html>
I want to make a default 2 columns web site layout. But I want to use different background colors for the menu and for the content area.
Is it anyhow possible to make the height of two div tags for the same? Or any other trick to make the "gray" are full along the "white" area?
Here is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body{
background: #adb2bd;
margin: 0px;
padding:0px;
}
#menuback {
position:absolute;
background: #ccc;
width:100px;
text-align:top;
border: 0px solid #000;
border-left-width:1px;
border-right-width:1px;
}
#caption {
background: #fff;
padding-left:102px;
width:300px;
border: 0px solid #000;
border-right-width:1px;
text-align:top;
}
#content {
width:400px;
margin:auto;
margin-top:20px;
text-align:center;
}
</style>
</head>
<body>
<div id="content">
<div id="menuback"><ul><li>menu</li><li>menu</li><li>menu</li></ul></div>
<div id="caption"><h2>Caption</h2><p>Some text here</p><p>And much more text</p>
<p>and text and text and text</p> <p>and text and text and so on...</p><p> </p></div>
</div>
</body>
</html>