Solved

Change hyperlink color in a layer (CSS)

Posted on 2007-04-10
2
751 Views
Last Modified: 2013-11-19
probably a basic question, but in my CSS i have this:

a:link            { color: navy; }
      a:visited       { color: navy; }
      a:hover            { color: whitesmoke; background-color: #474B39;}
      a:active       { color: #FFFFFF;  }
      
which works great to set the default on my page.  But there is one div layer in my document that I want my hyperlinks to be a different color than the default.  My CSS for that section reads:

.recuadro{
      background-image:url(images/back_recuadro.jpg);
      background-position:top;
      background-repeat:repeat-x;
      min-height:50px;      
      width:100%;

}

what do I need to add to make hyperlinks in that area a different color than the default?   My page is xhtml 1.1 strict.   TY!

      
0
Comment
Question by:arthurh88
[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 Comments
 
LVL 30

Accepted Solution

by:
VirusMinus earned 500 total points
ID: 18886447
just create new styles as follows:

.recuadro a:link{}
.recuadro a:visisted{}

etc.

that will apply to links inside any div with the recuadro class
0
 
LVL 4

Expert Comment

by:biXen
ID: 18888156
You can also write it like this:

.recuadro a, .recuadro a:link, .recuadro a:visited, .recuadro a:active{
color: #555555;
}
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

617 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