?
Solved

Problem with CSS styles

Posted on 2011-09-30
2
Medium Priority
?
210 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
[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 22

Accepted Solution

by:
Kim Walker earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 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