Solved

Change hyperlink color in a layer (CSS)

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS Won't Show Up On Drupal Omega Sub-Theme 1 36
form isn't working is it missing a document 21 64
Pass a js value to an html form 5 43
HTML 5 Input Type Numeric 5 32
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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 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 …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

751 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