Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-18-2006, 06:52 AM   PM User | #1
phpfanman
New to the CF scene

 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
phpfanman is an unknown quantity at this point
change color of multicolored link

I would like a multicolored link text to be completely one color when the link is visited.

Here's what I have:

.box A:visited {

color: #FFFFFF;
}

The form is basically
<a href=""> this text <green> is</green> multi-<blue>colored</blue> </a>

Once the link is clicked all the link text should be black. Is this feasible? How should the order of inheritance be done?
phpfanman is offline   Reply With Quote
Old 09-18-2006, 07:18 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
.box a, .box a:link {
color:#000;
}
.box a span.green, .box a:link span.green {
color:#008000;
}
.box a span.blue, .box a:link span.blue {
color:#00F;
}
.box a:visited span {
color:#000;
}
</style>
</head>

<body>
<div class="box">
<a href="#"> this text <span class="green"> is</span> multi-<span class="blue">colored</span> </a>
</div>
</body>
</html>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:47 AM.


Advertisement
Log in to turn off these ads.