See http://jsfiddle.net/PdZrt/
Basically I have applied the yui reset and base and am the trying to seperately style a ul for a menu. The li’s pick up the style but the ul doesn’t appear too.
Any ideas?
In the fiddle there should:
list-style: none;
padding: 0;
margin: 0;
background-color:Red
There are a couple issues here.
One, that jsfiddle is all on one line and wrapping.
Two, your CSS for the
ulreads:.nav-menu ul—nav-menuIS theul, thus it should read:The reason the
background: redisn’t showing up is because the elements inside of the<ul>, the<li>s havefloat: leftset. This removes from from the flow of the<ul>and effectively makes your<ul>have a height of 0. While there is more than one way to solve this problem, the quickest would be to add aoverflow: hiddento the<ul>.