Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Different link attributes possible on same page?

Can you have two unique linking attributes for separate font classes?

10:05 pm on Feb 18, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 25, 2003
votes: 0

Excellent site! Great resource here for anyone working with CSS.

I'm not exactly new to CSS but beyond using style sheets as basic text guides for a couple of years, I have only recently begun to explore all the other advantages CSS gives to web designers.

I haven't seen this question asked yet, and after trying -- but failing -- to play around with what I thought were solutions, so am asking:

Is it possible to include on a style sheet more than one text-link attribute beyond the basic a:link, a:visited, etc.? I've tried including link/visited/etc. attributes with a specific font class but that seems to only result in the link color acting as a background color instead of the linked-font color.

My dilemma is this: I'm using the standard a:link attributes to control the color and behavior of my nav bar font. However, I don't want the same attributes to influence the color or behavior of another set of links on the same page(s).


5:36 am on Feb 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
votes: 0

Welcome to Webmaster World!

Yes, it is very much possible, by defining classes :)

For example, let's say that you're using the regular a:link a:visited etc for the "normal" links on the page. Then, all you have to do is give your navigation links a separate class. For example:

<a href="#" class="nav">Navigation link</a>

In your style sheet:

a.nav:link {
color: #06c;
a.nav:visited {
color: #c60;


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members