Ok so I have an a DIV tag with a another div/header inside of it. Inside of that div/header tag I have an UL tag. For the main DIV tag and header I have margin-top: 0px so the outer one is up against the top of the body/browser, and the header DIV tag is also up against the top of that parent DIV tag.
However when I put the UL tag and have that set to a magin-top: xx, it stays at the top and the outer most DIV applies the margin-top of the UL tag to it. Very frustrating.
HTML:
CSS:
Hopefully that makes sense!
However when I put the UL tag and have that set to a magin-top: xx, it stays at the top and the outer most DIV applies the margin-top of the UL tag to it. Very frustrating.
HTML:
Code:
<div id="site-outside-wrapper">
<div id="header">
<img class="logo" src="assets/graphics/logo.gif" />
<ul class="nav1">
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
</div>
</div>
CSS:
Code:
#site-outside-wrapper {
position: relative;
margin-top: 0px;
width: 700px;
height: 800px;
margin-right: auto;
margin-left: auto;
background-color: black;
border: 0px solid black;
}
#header {
position: relative;
height: 100px;
margin-top: 0px;
background-color: red;
border: 0px solid black;
}
img.logo {
float: left;
margin-top:0px;
margin-left:25px;
}
ul.nav1 {
position: relative;
margin-top: 0px;
margin-left: 400px;
margin-bottom: 0px;
padding: 0px;
border: 1px solid black;
}
ul.nav1 li {
display: inline;
border: 1px solid black;
}
Hopefully that makes sense!