开发者

Unwanted Margin around menu

开发者 https://www.devze.com 2023-03-31 08:25 出处:网络
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 b

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消