PDA

View Full Version : doulbe link colors


neonfluxx
12-13-2006, 11:37 PM
I'm using css: I want to have 2 different colors for link that are active. Not a hover. Just when the links are displayed. any ideas.

domedia
12-14-2006, 12:04 AM
Hi neon, what do you mean by 'active link'? Do you mean a link that get's focus from tabbing the page?

neonfluxx
12-14-2006, 12:44 AM
It might help if i give a better explanation hugh, sorry about that.

Okay: css i define the links:

a:link {
font-family: Tahoma;
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:visited {
font-family: Tahoma;
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:hover {
font-family: Tahoma;
font-size: 12px;
color: #FFCC00;
text-decoration: none;
}
a:active {
font-family: Tahoma;
font-size: 12px;
color: #000000;
text-decoration: none;

Now all the links on the page display with those specifications on the page css is connected to. Is there a way to specify how some links on the page would lets say be black and some would be white.

If you get what i mean. Normally links on the page are one color unless you use image rollovers. I hope i explained this right.

chriskq
12-14-2006, 02:21 AM
give the a tag a specific class so u can just target one variety of links.
eg: <a href="blah.html" title="blah" class="option1">text here</a>

now in your css,
a.opiton1 {
color: ___;
text-decoration: ___;
border: ___;
}

Does that make sense?

ps, i dont know what this is

a:link


it should just be
a {
specifics here
}

toodles

edbr
12-14-2006, 03:07 AM
this also does it
in your style sheet

a.two:link {color: #666666}
a.two:visited {color: #000000}
a.two:hover {font-size: 150%}

your link
<a class = "two" href="http://www.yourlink.com">Your link</a>

domedia
12-14-2006, 01:33 PM
edbr and chris suggestion is basically the same, add a class tot he link so you can give it a special style :)


ps, i dont know what this is


it should just be
a {
specifics here
}

toodles
Think you got that wrong chris, :link should normally always be defined. Remember LoVe/HAte:
a:link
a:visited
a:hover
a:active

http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes

neonfluxx
12-15-2006, 01:02 AM
can someone show me a little clearer example please.

chriskq
12-15-2006, 02:22 AM
point us to where your page is so i can give a specific example.

to Dom;
i understand the love/hate thing.... but an a tag is always going to be a link isnt it... so isnt doesnt it become redundant if u specify a:link{}.... because a{} covers it all.

well thats my reason as im not a fan of specifying different colors for visted and active links at least anyways. i only use a and hover

domedia
12-15-2006, 01:03 PM
You're making sense logically chris.. I have to test this out.