View Full Version : display:inline;

04-03-2007, 11:15 AM
Okie i want to make a menu with nested unordered lists.

the top-level menu should be horizontal so i add a CSS rule

#menu ul li {

the problem is that after that and the second-level would appear horizontal, instead of vertical that i want, and have the same properties with the first level..

How can i bring back the normal list behaviour?


04-03-2007, 11:19 AM
What you really want here is the child selector, #menu>ul>li. Unfortunately, IE6 doesn't support this little gem, so you'll have to override it:
#menu ul li {
display: inline;

#menu ul ul li {
display: list-item;