Forum Moderators: not2easy
------------------------After the header:
<br class="clear" />
<div id="footer" />
<div>
------------------------Here is my CSS:
/* Footer */
#footer {
width: 960px;
min-width: 910px;
margin: -84px 0px 0px 0px;
_margin: 0px;
background: transparent url(../images/footer.png) bottom center no-repeat;
_background: none;
position: relative; /* Needed for Safari */
}
#footer div {
width: 1027px;
height: 60px;
margin: 0px auto;
padding-top: 40px;
color: #FFFFCC;
font-size: 12px;
}
#footer a {
color: #FFCC66;
font-size: 12px;
margin-right: 10px;
}
#footer_left {
margin-left: 0px;
}
#footer_right {
margin-left: 0px;
}
#footer_right a img {
margin-bottom: -15px;
}
Strange that you'd say position:relative is required for Safari. I don't know much about safari, but it doesn't make much sense to me that that would fix anything, unless safari (your your page) is extremely buggy.
Are you running a proper doctype at the top of your pages?
As Marshall said (just reiterating for clairifaction), The simplest way to center a block level item horizontally is to use margin:0 auto, which makes top and bottom margin 0, and the left and right AUTOmatically fit the remaining space. (Content cannot go on top of the margined space unless you use absolute positioning, but chances are you don't want that anyway)
HTML ---------------
....
</script><!--[if lt IE 7.]>
<script defer type="text/javascript" src="css/pngfix.js"></script>
<![endif]--><!--Preload BG-->....
<style type="text/css">
body
{background-image: url("images/main_bg.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center}
</style>
</head> (For some reason, when I remove the style immediately above, it does not show up correctly.)
<br class="clear" />
<div id="footer" />
CSS ----------------
html, body {
margin: 0px;
padding: 0px;
}
body {
margin: 0px auto;
color: #FFCC66;
font-size: 11px;
font-family: "Arial", "Helvetica", "Verdana", sans-serif;
_background: #FFF url(../images/footer.jpg) bottom center no-repeat;
}
br.clear {
clear: both;
}
a img {
border: none;
}
img, div {
behavior: url(iepngfix.htc);
}
#container {
width: 100%;
/* background: transparent url(../images/body_bg.gif) top center repeat-x; */
background: transparent url(../images/main_bg.jpg) top center no-repeat;
}
#contentainer {
width: 1027px;
height: 100%;
padding: 0px 0px 100px 0px;
_padding-bottom: 0px;
background-color: transparent;
background-position: bottom left;
background-repeat: no-repeat;
}
/* Content */
#flash_nav {
width: 830px;
height: 255px;
}
/* Footer */
#footer {
width: 100%;
min-width: 800px;
margin: -84px 0px 0px 0px;
_margin: 0px;
background: transparent url(../images/footer.png) bottom center no-repeat;
_background: none;
padding: 0px;
text-align: left; /* Needed for IE*/
}
#footer div {
width: 940px;
height: 60px;
margin: 0px auto;
padding-top: 40px;
color: #FFFFCC;
font-size: 12px;
}