Solved

How to change a.active color...

Posted on 2014-04-10
5
149 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

815 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

9 Experts available now in Live!

Get 1:1 Help Now