halfalime
05-22-2008, 11:45 AM
Hi,
My footer at the bottom of my site wont go down when my content gets to big for the div, the div expands but it goes under the footer.
Heres my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" href="limestyle.css" type="text/css" />
<title></title>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="main">
<div id="left"></div>
<div id="right"></div>
</div>
<div id="footer"></div>
</div>
</body>
</html>
*{
margin:0;
padding:0;
}
body
{
margin:0;
padding:0;
height:100%;
background-color:#dad8d8;
}
#container {
min-height:100%;
position:relative;
width:60%;
height:100%;
margin:auto;
}
#header {
background:black;
padding:10px;
}
#main {
padding:10px;
background-color:yellow;
padding-bottom:60px; /* Height of the footer */
min-height:300px;
}
#left
{
width:30%;
height:100%;
min-height:200px;
background-color:red;
float:left;
}
#right
{
width:70%;
min-height:200px;
background-color:green;
float:left;
}
#footer {
position:absolute;
bottom:0;
width:100%;
height:60px; /* Height of the footer */
background:blue;
}
Thanks
HalfALime
My footer at the bottom of my site wont go down when my content gets to big for the div, the div expands but it goes under the footer.
Heres my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" href="limestyle.css" type="text/css" />
<title></title>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="main">
<div id="left"></div>
<div id="right"></div>
</div>
<div id="footer"></div>
</div>
</body>
</html>
*{
margin:0;
padding:0;
}
body
{
margin:0;
padding:0;
height:100%;
background-color:#dad8d8;
}
#container {
min-height:100%;
position:relative;
width:60%;
height:100%;
margin:auto;
}
#header {
background:black;
padding:10px;
}
#main {
padding:10px;
background-color:yellow;
padding-bottom:60px; /* Height of the footer */
min-height:300px;
}
#left
{
width:30%;
height:100%;
min-height:200px;
background-color:red;
float:left;
}
#right
{
width:70%;
min-height:200px;
background-color:green;
float:left;
}
#footer {
position:absolute;
bottom:0;
width:100%;
height:60px; /* Height of the footer */
background:blue;
}
Thanks
HalfALime