custom hyperlink style

I have a body style which has hyperlink styles added.

I have also links with special styles of their own. I don't want them to share the body hyperlink styles, but they are overriding. How do I get them to force using the custom style?

body a
{
    color: #00008B;
    text-decoration: underline;
}
body a:hover
{
    color: Maroon;
}
body a.selected
{
    color: #00008B;
}

.ASPHyperLinkSmall
{
    font-family: Verdana;
    font-size: 11pt;
    color: #00008B; /* darkblue */
}

.ASPHyperLinkSmall A:link, .ASPHyperLinkSmall A:visited
{
text-decoration: none !important;
}

.ASPHyperLinkSmall A:hover
{
    text-decoration: underline !important;
}
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dan_nealCommented:
Just to be clear the .ASPHyperLinkSmall class is a container of sorts that contains the <a> elements?
If this is not correct, and .ASPHyperLinkSmall is a class assigned to the <a> elements then you'll need to change to:
a.ASPHyperLinkSmall
{
    font-family: Verdana;
    font-size: 11pt;
    color: #00008B; /* darkblue */
}

a.ASPHyperLinkSmall:link, a.ASPHyperLinkSmall:visited
{
text-decoration: none !important;
}

a.ASPHyperLinkSmall:hover
{
    text-decoration: underline !important;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
Perfect!
Thanks!
 
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.