Solved

How to change a.active color...

Posted on 2014-04-10
5
141 Views
Last Modified: 2014-04-30
Hi!

In my header of my webpage, i want the a:active.color to always be white.
But on a different place on my site, i want this a.active.color to be blue color

How can i do this ?

My CSS locks like this now:

a:active {
    color: #ffffff;
}
a:visited {
    color:#ffffff;
}

Open in new window

0
Comment
Question by:team2005
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:jayakrishnabh
ID: 39991132
<style>
header a {
            color: green;
        }
        a {
            color: blue;
        }
</style>

<header>
    <a>Header anchor</a>
<header>
<section>
    <a>Section anchor</a>
</section>
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39991464
 a:visited.white_active{color:#fff;}
 a:visited.blue_active {color:blue;}

<a href="#" class="white_active">Some Link</a>
<a href="#" class="blue_active">Some Link</a>

Open in new window


Or
.area_1 a:visited {color:blue;}
.area_2 a:visited {color:green;}
.header a:visited{color:#fff;}

<div class="header"><a href="#">Some Link</a></div>
<div class="area_1"><a href="#">Some Link</a></div>
<div class="area_2"><a href="#">Some Link</a></div>
<!-- below is browser default -->
<a href="#">Some Link</a>

Open in new window

0
 
LVL 2

Author Comment

by:team2005
ID: 39991578
Hi!

Have this code now:

.socialh a:link {
    text-decoration: none;
}

.socialh a:active {
    color: #ffffff;
}

.socialh a:visited {
    color: #ffffff;
}


.rapport1_del3 a:link {
    text-decoration: none;
}

.rapport1_del3 a:active {
    color: blue;
}

.rapport1_del3 a:visited {
    color: blue;
}

Open in new window


.socialh  is working fine, but
.rapport1_del3 a:link is giving me a
Underline ???
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39991595
Can you provide a link to your test page to look at. Obviously there is something else.
0
 
LVL 2

Author Closing Comment

by:team2005
ID: 40031374
thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now