.header2
{
background-color:#CDD1CD; /*have to change */
/*padding: 15px 0;*/
}
.header1
{
background-color: #60db60; /* have to change */
padding: 10px 0;
}
/*Fixed header properties */
.fixed
{
position: fixed;
top:0; left:0;
width: 100%;
}
.right
{
float: right;
}
<div class="headers header1" id="header1">
<div class="logo"></div>
<div class="slogan"></div>
</div>
<div class="headers header2 clearboth" id="header2">
<nav class="login_links">
<ul>
<li>Are you a member?</li>
<li><a>Register</a></li>
<li><a>login</a></li>
</ul>
</nav>
</div>
You can see the gap between two headers. If i give float:left
to nav
it will be fixed. What could be the reason? What are the possibilities.
EDIT:
After a few edits i found it is caused by ul
element's margin
.
ul
{
margin: 0;
}
Where does this margin come from?