2 replies [Last post]
cbird1057
cbird1057's picture
Offline
newbie
Last seen: 13 years 39 weeks ago
Joined: 2008-03-06
Posts: 2
Points: 0

This is probably a very common problem, but I'm having trouble styling links to appear differently within a single DIV and can't find any solutions in the forum.

I've got my #main div which I'm very happy with...

Then I've got a style for the links within the #main div:

#main a:link, #main a:visited {
text-decoration: none;
color: #000000;
}

and later in the CSS I've got this for styling the lists:

#main ul a:link, #main a:visited {
text-decoration: none;
color: #D40000;
}

The problem is that the non-list links appear Red #D40000 in Safari, and #000000 Black in Firefox.

THEN when I try to juggle the order of the CSS around it gets really crazy, with the first line of the lists appearing Black with the rest of the list in Red, but the non-list links appearing correct in both browsers.

Am I setting up the code right? Is there a proper way for doing this that I am missing?

The page is at http://home.comcast.net/~studio1057

Many thanks to anyone that can help shed some light on this.

- Chris

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 7 years 39 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

make the following

make the following addition:
#main ul a:link, #main ul a:visited {
text-decoration: none;
color: #D40000;
}

cbird1057
cbird1057's picture
Offline
newbie
Last seen: 13 years 39 weeks ago
Joined: 2008-03-06
Posts: 2
Points: 0

Good Eye

It's obvious you've got "wolf vision"

Thanks for helping me out.