Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS links, differing styles

Status
Not open for further replies.

AlbertAguirre

Programmer
Nov 21, 2001
273
0
0
US
I would like my regular page / content links to be one style but my navigational links to be another.

I created a class called leftNav and it looks good, but when I format my normal links "a:link {color: #888888;}" my "leftNav" class is over written.

How do I avoid this?

css code:

a:link {color: #888888;}
a:link:hover {color: #ffffff;} <-- this overrides the style below

a.leftNav {color: #FFFFFF;}
a.leftNav:hover {color: #888888;}
 
same as other thread

.leftnav a
.leftnav a:link
etc.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
One way is to define a different class for all the anchors that do NOT have the class=leftNav and change your CSS accordingly.

Based on what I see though, the class specific style should be overwriting the general anchor style.

Another thing I see, there is really no use to add the :link psuedoclass to your CSS definitions.


[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top