3
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 code in one piece, it loses the background #1a1e27
but leaves my menu horizontal. When I take all the #topo li {}
, it assigns the background color.
What I’m doing wrong?
@Bacco In fact, the problem can be reproduced only with the original code posted: http://jsfiddle.net/tZe4L/
– mgibsonbr
@Rod now got the two colors right, see if that’s it.
– Bacco