Solved

Problem with CSS styles

Posted on 2011-09-30
2
205 Views
Last Modified: 2012-08-13
Hello all,

I've set the links for the entire page to white as follows:
a:link {
      color: #FFFFFF;
      text-decoration: none;
}
a:visited {
      text-decoration: none;
      color: #FFFFFF;
}
a:hover {
      text-decoration: none;
      color: #FFFFFF;
}
a:active {
      text-decoration: none;
      color: #FFFFFF;
}

But there are two specific links I need to be black, on this style:

.style35 {color: #838484; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold;
}

How do I make style35 to have black links?

Thanks!
0
Comment
Question by:pvg1975
2 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 total points
ID: 36892269
I'm assuming that "style35" is the class name of a <p> tag and the link you want to be black is within that <p> tag. Is this correct?

If so, you would use the descendant selector as such:

.style35 a {color: #000;}

Open in new window


This simply says that all <a> tags that are descendants of an element with a class name of "style35" should be black.
0
 

Author Closing Comment

by:pvg1975
ID: 36892320
Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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 …

910 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

21 Experts available now in Live!

Get 1:1 Help Now