I'm doing a webpage for a school project And I've run into this problem.
I have a div, which contains the header, and a div with the horizontal navigation bar. Between those divs there is a gap. I have read through my code and can't find out why.
No matter what I seem to do nothing works.
I have already set margin/padding to 0px on all elements without luck.
Here is the code:
asp/html
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="StyleSheet.css" rel="stylesheet" />
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="wrapper">
<div id="header">
<asp:Image ImageUrl="_res/Logo.png" runat="server" />
</div><div id="menuBar">
<asp:Image ImageUrl="_res/menubar.png" runat="server" />
</div>
<asp:ContentPlaceHolder ID="cphMain" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
CSS
* {
margin: 0;
padding: 0;
}
body {
background-color: #2e261e;
background-image:url(_res/sides.png);
background-repeat:repeat-x;
}
#wrapper {
width: 960px;
margin-left:auto;
margin-right:auto;
}
#header {
margin:0px;
}
#menuBar {
margin: 0;
}
I have tried display:block
, does nothing.. Sorry for the extremely poor phrased question.