1) On the site I am designing I would like the footer to stay at bottom of the window and when content is bigger than window I would it to move accordingly.
2) My divs are 1px off balance to the left in IE how would I fix this?
The banner, navbar, and footer bar is that way when viewing this page in IE http://inevmaps.hl2f...om/v9/index.php
3) How would I add padding to a div which has a background image without the background image spilling out of the div? An example where I want to do this is adding a 5px all around padding to my #footer div.
Of course here is the CSS and the html:
CSS:
@charset "utf-8";
/* CSS Document */
body{
margin:0px;
background: #526d7b url(images/bg.gif) repeat-y scroll top center;
text-align:center;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
#main_container{
width:850px;
height:auto;
margin:auto;
}
#banner{
background-image:url(images/banner.jpg);
width:850px;
height:150px;
}
#nav_bar{
width:850px;
height:32px;
}
#footer
{
background: url(images/footer_bar.gif) scroll bottom center;
height:32px;
width:850px;
color:#666666;
}
#content_container{
width:850px;
height:auto;
}
/*News Code Begin*/
HTML:
(Please excuse the ugly auto java code that dreamweaver made for my rollover images)
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="inevmaps.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('images/home_over.gif','images/maps_over.gif','images/media_over.gif','images/forums_over.gif','images/about_over.gif','images/contact_over.gif')">
<div id="main_container">
<div id="banner"></div>
<div id="nav_bar">
<a href="http://inevmaps.hl2files.com/index.php" onmouseout="MM_swapImgRestore()" onmouseover= "MM_swapImage('Home','','images/home_over.gif',1)"><img src="images/home.gif" name="Home" width="140" height="32" border="0" id="Home" /></a><a href="http://inevmaps.hl2files.com/maps.php" onmouseout="MM_swapImgRestore()" onmouseover= "MM_swapImage('Maps','','images/maps_over.gif',1)"><img src="images/maps.gif" name="Maps" width="142" height="32" border="0" id="Maps" /></a><a href="http://inevmaps.hl2files.com/media/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Media','','images/media_over.gif',1)"><img src="images/media.gif" name="Media" width="143" height="32" border="0" id="Media" /></a><a href="http://inevmaps.hl2files.com/forums/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Forums','','images/forums_over.gif',1)"><img src="images/forums.gif" name="Forums" width="143" height="32" border="0" id="Forums" /></a><a href="http://inevmaps.hl2files.com/about.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('About','','images/about_over.gif',1)"><img src="images/about.gif" name="About" width="142" height="32" border="0" id="About" /></a><a href="http://inevmaps.hl2files.com/contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','images/contact_over.gif',1)"><img src="images/contact.gif" name="Contact" width="140" height="32" border="0" id="Contact" /></a>
</div>
<div id="footer"><br />
Copyright © 2007 Inevitable Maps - Designed by NightWolf - Best if viewed in a 1024*768 resolution or higher</div>
</div>
</div>
</body>
</html>
Here is my site useing the code above http://inevmaps.hl2f...om/v9/index.php

