I want the height of the right side column (id="menu") stretch down automatically, when the amount of content on the left side (id="page00") makes the "page00" div taller than the "menu" div and/or viceversa. I mean when I enter text and image in "page00" div, I want the height of "menu" div increase dynamically and/or viceversa. Please note that these two divs are inside the "content" div and all of the divs are wrapped into a "wrap" div.
I have the option to use tables for my purpose but I want to get it done via divs and css.
Here is the codes I have used to build a layout for my website:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fa">
<!-- Meta information -->
<head>
<meta content="fa" http-equiv="Content-Language" />
<meta name="keywords" content="" />
<meta name="discription" content="" />
<meta name="author" content="" />
<title>
</title>
<link rel="stylesheet" type="text/css" href="Style.css" />
</head>
<!-- Page body -->
<body>
<div id="wrap">
<div id="header">
<div id="logo">
<h1><a href="index.html" title="homepage">
Subject
</a></h1>
</div>
</div>
<div id="content">
<div id="menu">
<br />
</div>
<div id="page00">
<br />
</div>
</div>
<div id="footer-pa">
<div id="footer">
</div>
</div>
</div>
<body>
</html>
And The CSS file used is this (style.css) :
body
{
background: url("images/010.jpg") repeat;
margin: 0;
font-family: Tahoma;
}
#wrap
{
background-color: #ffffff;
width: 820px;
padding: 10px 0;
margin: 10px auto;
}
#header
{
margin: 0 auto;
width: 800px;
height: 70px;
background: #C0C0C0;
border-bottom: 1px solid #000000;
}
#logo
{
float: left;
margin: 30px 0 0 30px;
cursor: default;
}
#logo a
{
color: #000000;
text-decoration: none;
}
#content
{
width: 800px;
height: inherit;
margin: 0 auto;
clear: both;
}
#page00
{
float: left;
width: 600px;
height: 100%;
background: #DCE9F5;
margin: auto;
}
#menu
{
float: right;
width: 200px;
height: 100%;
background: gray;
margin: auto;
}
#footer-pa
{
padding-top: 5px;
clear: both;
}
#footer
{
height: 40px;
width: 800px;
clear: both;
margin: 0 auto;
background: #C0C0C0;
}
All of your suggestions, constructive critics and solutions are welcome. But I will be most pleased if someone does the favour to me and gives me the solution to my problem.
Thank you in advance