rishid
05-04-2006, 06:52 PM
Hi,
Trying to have a fixed width navigation menu of say 150px on the left side, then a content div that fills up the rest of the screen regardless of the resolution.
This is what I have below, but cannot figure out how to get the #content div to fill the rest of the screen.
Can this be done in CSS?
Thanks,
RishiD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Blah</title>
<style type="text/css">
#wrapper {
width: 100%;
margin: 10px auto;
}
#categories {
width:150px;
padding:5px 5px;
}
#content {
float:left;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="categories">
THIS IS THE NAV
</div>
<div id="content">
THIS IS THE MAIN CONTENT
</div>
</div>
</body>
</html>
Trying to have a fixed width navigation menu of say 150px on the left side, then a content div that fills up the rest of the screen regardless of the resolution.
This is what I have below, but cannot figure out how to get the #content div to fill the rest of the screen.
Can this be done in CSS?
Thanks,
RishiD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Blah</title>
<style type="text/css">
#wrapper {
width: 100%;
margin: 10px auto;
}
#categories {
width:150px;
padding:5px 5px;
}
#content {
float:left;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="categories">
THIS IS THE NAV
</div>
<div id="content">
THIS IS THE MAIN CONTENT
</div>
</div>
</body>
</html>