
Originally Posted by
tomyknoker
I have a sub-menu using links which I'm using this code for
Code:
a:link {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: underline;
}
BUT my problem is I have other links on the page which I don't want to have these values I want them to have there own complete style... How can I do this?
You need to introduce an ancestor into the selectors. That is, identify the submenu itself with either a class or id attribute (probably the former), and then prefix each rule with that class name. For example,
Code:
ul.menu a:link {
/* ... */
}
HTML Code:
<ul class="menu">
<li><a href="/somewhere/">Somewhere</a></li>
<!-- ... -->
Mike
Bookmarks