Forum Moderators: not2easy
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Footer</title>
<style type="text/css" media="screen"><!--
*
{
margin: 0;
}
html, body
{
background-color: #585858;
margin-top: 0;
height: 100%;
}
#container
{
background-color: #dadada;
position: relative;
width: 768px;
min-height: 100%;
margin: 0 auto;
}
#content
{
background-color: #fff;
width: 728px;
float: left;
margin-bottom: 0;
padding: 20px 20px 0;
}
.block
{
width: 300px;
height: 200px;
float: left;
border: solid 1px #4aa5ee;
}
#push { height: 26px; }
#footer
{
color: #000;
font-size: 10px;
font-family: arial;
position: absolute;
bottom: 0;
width: 748px;
height: 16px;
margin: 0 auto;
padding-top: 5px;
border: solid 1px #f37134;
}
--></style>
</head>
<body>
<div id="container">
<div id="content">
<p>Main content of site</p>
<div class="block">block a</div>
<div class="block">bloc b</div>
</div>
<div id="push"></div>
<div id="footer">footer</div>
</div>
</div>
</body>
</html>
sQ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Footer</title>
<style type="text/css" media="screen">
body {margin:0;padding:0;}
html, body, #container {
background-color: #585858;
margin-top: 0;
height: 100%;
min-height: 100%;
width: 100%;
}
html>body #container { height: auto;}/* for firefox - can't remember why though */
#container {
background-color: #dadada;
position: absolute;
top: 0;
left: 0;
text-align:center;
}
#content {
background-color: #fff;
width:728px;
margin: 0 auto 50px auto ;
padding:20px 20px 50px 20px;
text-align:left;
}
.block
{
width: 300px;
height: 200px;
float: left;
border: solid 1px #4aa5ee;
}
#push { height: 26px;clear:both }
#footer {
width: 100%;
padding-top: 0;
overflow: hidden;clear: both; position: absolute; bottom: 0; left: 0; text-align:center;}
#footer_centre {
color: #000;
font-size: 10px;
font-family: arial;
position:relative;
width:768px;
height: 16px;
margin: 0 auto;
padding-top:5px;
border: solid 1px #f37134;
text-align:left;
}
</style>
</head>
<body>
<div id="container">
<div id="content">
<p>Main content of site</p>
<div class="block">block a</div>
<div class="block">block b</div>
<div id="push"></div>
</div>
<div id="footer">
<div id="footer_centre">footer</div>
</div>
</div>
</body>
</html>
sQ
So does this now mean I can float divs left and right within the content div and the footer will stay stick to the bottom as well as not go through the content should the user resize the browser window.
Looking at this, that seems to now be the case and I'm incredibly grateful to you for helping me with this.