"John Topley" <john@$NO_SPAM$topley.freeserve.co.uk> wrote:
http://www.johntopley.com/development/lists.html - it's the #menu part.
OK, now we are getting at something. It helps to know the facts of the
case.
I think it might be something to do with the fact that I'm styling my
outer list with an image.
Nope.
It's a cascade issue. First, you have
/* Doesn't work? */
#menu ul ul li {
font-weight: normal;
}
And it really doesn't work - for any <a> element, no matter how nested
inside other elements, if there is _any_ style sheet that assigns a
font-weight value to it.
Second, changing the selector to
#menu ul ul li a
is not sufficient. By the cascade rules, it has specificity (0,1,0,4), so
it loses to a rule like
#menu li a:visited {
color: #000;
font-weight: bold;
text-decoration: none;
}
where the selector has specificity (0,1,1,2), which is greater. The key
is the pseudoclass selector :visited (or :link or whatever applies),
which contributes to the third component in the specificity. Using the
selector
#menu ul ul li a:visited
would help, and so would !important. But your sample is too sketchy - you
are not really going to make the mistake #1 of setting unvisited and
visited links similar, are you? - to allow a specific (no pun intended)
constructive suggestion.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/