PDA

View Full Version : Problem with html


gigiloumill
01-31-2012, 09:11 PM
Guys, i have a problem that's driving me crazy. I can't figure out why it correctly. I am trying to add a div inside of a div and when I view in DW it looks fine but on the server it's not where it's supposed to be. Can someone please tell me what I'm not seeing? Thanks.



body {
width:520px;
margin:0; padding:0; border:0;
}

a {
border:none;
}

img {
border-style: none;
}

#fbhead {
width:520px;
height:600px;
background-image: url(images/fbmain.png);
background-repeat:no-repeat;
}


#bio {
width:520px;
background-image: none;
background-repeat:no-repeat;
background-color: #D2EBF8;
}
#nav {
height: 30px;
width: 300px;
margin-top: 90px;
margin-right: auto;
margin-left: auto;
padding:0; border:0;
}

#bio-wrp {
padding:10px 20px 30px;
}


</style>


</script>




</head>

<body>


<div id="fbhead">

<div id="nav">hello</div>

</div>

<div id="bio">


<div id="bio-wrp">
<p style="font-family: Georgia, 'Times New Roman', Times, serif; font-size:24px; color: #415A92; font-weight:bold;">About Our Shop</p>
<div style="color:#535353; font-style:normal; font-family:Georgia, 'Times New Roman', Times, serif; line-height: 1.3 em; font-size:13.5px" >
<p>Fix all your auto problems in one place. At His &amp; Hers Auto Repair center in Miami. Whether you need engine repair, a referral for auto body services or tire services, we provide it all at one shop. We offer every auto repair service, including engine repair, air conditioning recharge, glass and windshield replacement, air bag service, brake service, and much more. Our 24-hour towing and roadside assistance ensures you’ll never be stranded, while our computer diagnostic services ensure you’ll get the repairs you need, and not a bunch of extra charges. We also sell new and used tires. For towing service, call 305.281.9897 and ask for Jorge Perez.</p>
</div>

</div>


</div>

<p style="text-align:right;">Provided by our friends at <a href="http://www.starionmedia.com" target="_new">starionmedia.com </a>
<div id="fb-root"></div>

</script>



</body>
</html>


I need to add a div called "nav" inside the "fbhead" div. But it doesn't display correctly. It puts the div on top of the "fbhead" and pushes down on it. Here's a link: http://hisandhersautorepair.com/facebook/.. Thanks

gentleone
02-01-2012, 05:38 AM
You have a collapsible margin. You could give #fbhead a padding-top instead or if you want to keep it like this then here's a fix.
http://snipplr.com/view/4831/

gigiloumill
02-01-2012, 09:38 AM
Wow. Thanks. You learn new things everyday.