PDA

View Full Version : all divs moving down when i add margin top to my footer div


silverglade
11-23-2009, 11:02 AM
hi, whole wrapper moves and all of the divs in it when i add margin top to my footer div. i cant get the #index_footer to go down without pulling all of the elements down with it for some reason. any help greatly appreciated. thanks. derek

here is the css

@charset "utf-8";
/* CSS Document */

* {
margin-top: 0px;
clear: both;
padding: 0px;

}

body {
margin: 0;
padding-top: 25px;
background-color: #000000;
}

#wrapper {
overflow: auto;
background: url(video_background.jpg) no-repeat;
width: 992px;
height: 742px;
border: 3px solid #999999;

margin-right: auto;

margin-left: auto;

}

#nav_slices {
float: left;
width: 950px;
height: 39px;
margin-top: 150px;
margin-right: auto;
margin-bottom: 0px;
margin-left: 25px;
}
#about_wrapper {
overflow: auto;
background: url(about.jpg) no-repeat;
width: 992px;
height: 742px;
border: 3px solid #999999;
margin-right: auto;
margin-left: auto;
}

#barry_info {
float: left;
width: 250px;
margin-top: 335px;
margin-right: auto;
margin-bottom: 0;
margin-left: 16px;
}

#about_content {
float: right;
width: 650px;
margin-top: 50px;
margin-right: 50px;
margin-bottom: 0;
margin-left: auto;
}

#photo_content_header {
margin: 0 auto 0 auto;
width: 650px;
link-decoration: none;
}

.art {
float: left;
width: 100px;
margin-top: 20px;
margin-right: auto;
margin-bottom: 20px;
margin-left: 30px;
}

#about_content p {
text-indent: 20px;
font-size: 18px;
}

#services_wrapper {
overflow: auto;
background: url(about.png) no-repeat;
width: 992px;
height: 742px;
border: 3px solid #999999;

margin-right: auto;

margin-left: auto;

}

#services_content p {

font-size: 17px;
}
#services_content {
float: none;
width: 650px;
margin-top: 230px;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
clear: none;
}

#photos_content {
float: right;
width: 650px;
margin-top: 50px;
margin-right: 50px;
margin-bottom: 0;
margin-left: auto;
}

#index_footer {
margin: 0 auto 0 auto;
width: 992px;
}



and here is the 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--[if lt IE 7]>
<link href="iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<link rel="stylesheet" href="jevideo.css" type="text/css" charset="utf-8" />
<title>J&amp;E Photography &amp; Video</title>

<script type="text/javascript">
<!--
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_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_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>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>

<body onload="MM_preloadImages('slices_on/home.png','slices_on/about.png','slices_on/services.png','slices_on/contact.png','slices_on/photos.png','slices_on/videos.png')">




<div id="wrapper">
<div id="nav_slices"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','slices_on/home.png',1)"><img src="slices_off/home.png" name="Image1" width="115" height="39" border="0" id="Image1" /></a><a href="about.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','slices_on/about.png',1)"><img src="slices_off/about.png" name="Image2" width="158" height="39" border="0" id="Image2" /></a><a href="services.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','slices_on/services.png',1)"><img src="slices_off/services.png" name="Image3" width="217" height="39" border="0" id="Image3" /></a><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','slices_on/contact.png',1)"><img src="slices_off/contact.png" name="Image4" width="153" height="39" border="0" id="Image4" /></a><a href="photos.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','slices_on/photos.png',1)"><img src="slices_off/photos.png" name="Image5" width="138" height="39" border="0" id="Image5" /></a><a href="videos.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','slices_on/videos.png',1)"><img src="slices_off/videos.png" name="Image6" width="138" height="39" border="0" id="Image6" /></a></div>

<div class="style1" id="index_footer">&copy; copyright 2009 J&E Photography & Video</div>
</div>
<!--end wrapper-->
</body>
</html>

silverglade
11-23-2009, 11:17 AM
nevermind after messing with it for like 2 hours i stopped editing it in wysiwyg mode and edited the css file directly and it acted normally.