[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to change a.active color...

Posted on 2014-04-10
5
Medium Priority
?
172 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 54

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 54

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

834 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