I have the following HTML code:
<div id="topo">
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contato</a></li>
</ul>
</div>
</div>
And the following CSS:
#topo {
background-color: #1a1e27;
color:#FFFFFF;
width:950px;
}
#topo li {
display:inline;
float: left;
margin-left: 5px;
}
When I leave this whole code, it loses the background #1a1e27
but leaves my menu horizontal. When I shoot all #topo li {}
, it assigns the background color.
What am I doing wrong?