?
Solved

How to change a.active color...

Posted on 2014-04-10
5
Medium Priority
?
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 1500 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 53

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

762 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