Use the first child selector: >
.menu > li {
font-weight: bold;
}
Not that if you need to support IE6, you'll have to do it manually, as IE6 doesn't support the >
selector:
.menu li a {
font-weight: bold;
}
.menu li ul li a {
font-weight: normal;
}
You'll have to use the child selector and make the top-level <ul>
unique by giving it some class:
ul.top-level > li > a {
font-weight: bold;
}
Demo: http://jsfiddle.net/kJJw9/
It will probably do it...
ul.menu li a
{
font-weight:bold;
}
ul.menu li ul li a
{
font-weight:normal;
}
ul.menu li.collapsed a{font-weight:bold;}