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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with css link colors

Status
Not open for further replies.

DataSpy

Technical User
Nov 15, 2002
39
0
0
US
Hello,
my problem is I want to make all links in my navigation menu one color and rest of the links on the page another color. The code that I use for the links on my page is:
Code:
a:link, a:visited, a:hover, a:active {
text-decoration: none;
color: #3300CC;
}

The code I have for my navigation menu is:
Code:
.nav {
height: 1px;
background-color: #8B8970;
font-size: medium;
font-family: Georgia, serif;
text-align: left;
line-height: 1.3em;
}

If I put color: #CCCCCC; inside the .nav class all it does is make the text that color not the links. I have ">>" seperating my links and those are the text that turn #CCCCCC and not the links themselves.

Any help greatly appretiated, thanx in advance!

 
You should make use of descendant selectors. Your code would then look like:
Code:
a {
text-decoration: none;
color: #3300CC;
}

.nav {
height: 1px;
background-color: #8B8970;
font-size: medium;
font-family: Georgia, serif;
text-align: left;
line-height: 1.3em;
}
[b]
.nav a {
color: #ccc;
}
[/b]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top