Solved

Change hyperlink color in a layer (CSS)

Posted on 2007-04-10
2
721 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
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…

743 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

11 Experts available now in Live!

Get 1:1 Help Now