Unwanted Margin around menu
I've searched this all day开发者_如何学JAVA (its 2pm here atm, so quite a bit of searching), there is a roughly 5px margin for a header include. The answers I've seen are usually related to inline blocks automatically adding margins, or using positioning. I've got both margin and padding set to 0, but still got this gap. Here's some code.
<style type="text/css">
#header{
margin:0;
padding:0;
width:100%;
background-color:#333;
}
#logo{
margin:0;
padding:0;
}
</style>
<div id="header">
<div id="logo"><a href="index.php"><img src="../img/logo.jpg" width="591" height="124" alt="SunnahSpace"></a>
</div>
</div>
That's a margin around your body
element - add margin: 0
to your body
element CSS and if you want your header to take all the space.
精彩评论