debecc
08-09-2007, 01:51 PM
Hi,
i have been searching for an answer to this and can't quite find an answer.
I have a layout with a header div. A container div that has a left menu div and a content div inside it - these are using floats. And also a footer div that I have tried outside of the container div as well as inside the container div.
I would like the left menu div be filled with a background color and to be 100% of the container div. Stopping at the footer.
Right now i can either get it to come close to the footer OR it goes past the footer to the end of the viewport.
I have just given the CSS and HTML that is revelant.
CSS:
body, h1, h2, h3, h4, h5, h6, p, blockquote, ul, ol, li, table, tr, th, td, form {
margin: 0; padding: 0; border: 0; list-style: none; font-size: 100%; font-weight: normal;
}
html, body {
height: 100%
text-align : center;
}
body {
background-color: #F9F4c5;
}
#header {
width: 750px;
margin: 0px auto;
padding: 0px;
}
#container {
padding: 0px;
margin-right: auto;
margin-left: auto;
width: 750px;
min-height: 100%;
margin-top: 0px;
margin-bottom: 0px;
}
/* IE-specific hack */
* html #container {
height: 100%;
}
#content {
width: 610px;
margin-right: auto;
margin-left: auto;
vertical-align: bottom;
float: right;
}
#lftmenu {
position:relative;
background-color: #9BD393;
width: 135px;
margin: 0px;
padding: 0px;
background-repeat: no-repeat;
float: left;
background-image: url(../images/toplftmenu.jpg);
background-position: left top;
text-align: right;
min-height: 100%;
}
.clearfloats {
line-height: 0px;
font-size: 0px;
clear: both;
height: 0px;
}
#footer{
background-color: #ae89bd;
width: 750px;
margin-right: auto;
margin-left: auto;
}
HTML
<!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">
.......
<div id="header"> HEADER CONTENT
</div>
<!-- Start Container -->
<div id="container">
<!-- Start of Middle Content -->
<div id="content">Middle Content
</div>
<!--Start Left Menu Content -->
<div id="lftmenu">
CONTENT FOR LEFT MENU
</div>
<div class="clearfloats"><!-- --></div>
<!--Start footer -->
<div id="footer">
CONTENT FOR FOOTER
</div>
</div>
Also a link to the site is here: http://www.insidescoopri.com/insidescoop/Untitled-1.html
THANKS SO MUCH TO ANYONE WHO CAN POINT ME IN THE RIGHT DIRECTION
IM LOST!!!
Thanks
Deb
i have been searching for an answer to this and can't quite find an answer.
I have a layout with a header div. A container div that has a left menu div and a content div inside it - these are using floats. And also a footer div that I have tried outside of the container div as well as inside the container div.
I would like the left menu div be filled with a background color and to be 100% of the container div. Stopping at the footer.
Right now i can either get it to come close to the footer OR it goes past the footer to the end of the viewport.
I have just given the CSS and HTML that is revelant.
CSS:
body, h1, h2, h3, h4, h5, h6, p, blockquote, ul, ol, li, table, tr, th, td, form {
margin: 0; padding: 0; border: 0; list-style: none; font-size: 100%; font-weight: normal;
}
html, body {
height: 100%
text-align : center;
}
body {
background-color: #F9F4c5;
}
#header {
width: 750px;
margin: 0px auto;
padding: 0px;
}
#container {
padding: 0px;
margin-right: auto;
margin-left: auto;
width: 750px;
min-height: 100%;
margin-top: 0px;
margin-bottom: 0px;
}
/* IE-specific hack */
* html #container {
height: 100%;
}
#content {
width: 610px;
margin-right: auto;
margin-left: auto;
vertical-align: bottom;
float: right;
}
#lftmenu {
position:relative;
background-color: #9BD393;
width: 135px;
margin: 0px;
padding: 0px;
background-repeat: no-repeat;
float: left;
background-image: url(../images/toplftmenu.jpg);
background-position: left top;
text-align: right;
min-height: 100%;
}
.clearfloats {
line-height: 0px;
font-size: 0px;
clear: both;
height: 0px;
}
#footer{
background-color: #ae89bd;
width: 750px;
margin-right: auto;
margin-left: auto;
}
HTML
<!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">
.......
<div id="header"> HEADER CONTENT
</div>
<!-- Start Container -->
<div id="container">
<!-- Start of Middle Content -->
<div id="content">Middle Content
</div>
<!--Start Left Menu Content -->
<div id="lftmenu">
CONTENT FOR LEFT MENU
</div>
<div class="clearfloats"><!-- --></div>
<!--Start footer -->
<div id="footer">
CONTENT FOR FOOTER
</div>
</div>
Also a link to the site is here: http://www.insidescoopri.com/insidescoop/Untitled-1.html
THANKS SO MUCH TO ANYONE WHO CAN POINT ME IN THE RIGHT DIRECTION
IM LOST!!!
Thanks
Deb