Been playing around with this piece of code for a while and am confused a bit.
How do I:
- Change the color of the each submenu?
- Make the submenu the same width as the main button?
HTML
<ul id="menu">
<li><a href="#">This is the button</a>
<ul class="submenu">
<li><a href="#">Button one</a>
</li>
<li><a href="#">Button two</a>
</li>
<li><a href="#">Button three</a>
</li>
</ul>
</li>
</ul>
widthattribute andbackground-colorand of#submenu liand see what happens.float:center, there's nothing like that. Also, remove all floats, they serve no purpose and just make weird effects on hover.