PDA

View Full Version : Specific rule not overwriting less specific rule



jeanpaul1979
Mar 22nd, 2007, 02:23 PM
Hi, the normal links on the site have an underline hover and i want the links with the breadcrumbLink class not to have them. I wrote this out in css but it's not working, what am i doing wrong?

here's the relevant css



a {
text-decoration: none;
color: black;
}
a:hover {
text-decoration: underline;
}
.breadcrumbLink {
color: white;
}
.breadcrumbLink a:hover {
text-decoration: none;
}

nexosis
Mar 22nd, 2007, 03:07 PM
Try this


a:link,a:visited,a:active {
text-decoration: none;
color: black;
}
a:hover {
text-decoration: underline;
}
.breadcrumbLink:link,.breadcrumbLink:visited,.breadcrumbLink:active {
color: white;
}
.breadcrumbLink:hover {
text-decoration: none;
}

ronaldb66
Mar 22nd, 2007, 04:37 PM
Please next time include the accompanying markup as well; style rules alone tell only half the story.

jeanpaul1979
Mar 22nd, 2007, 07:45 PM
Works great, thanks. I didn't knew those :pseudo things could be directly applied to ids and classes.