Solved

How do I control link colors in a div class?

Posted on 2011-02-20
6
311 Views
Last Modified: 2012-05-11
Hello

Please look at this page:

http://nobootleg.com/

And scroll down to the bottom -- you'll see a link "Terms of  Use".

I have various styles and divs containing the above text.

How do I change the a:link a:hover etc so that the font color is always white and always underlined.

Thanks!

Rowby

0
Comment
Question by:Rowby Goren
[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
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:BurnieP
ID: 34938602
You can add this in your css file :

a:link {
      color: white;
      }
a:visited {
      color: white;
      }
a:hover {
      color: white;
      }
a:active {
      color: white;
      }
0
 
LVL 15

Expert Comment

by:ludofulop
ID: 34938668
i think that

a {
 color: white;
 text-decoration: underline;
}

is enough
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 34938989
Sorry I should have been clearer.  I only want the links that are enclosed in either the following divs to be white etc.  (In other words I don't wan it to affect other links on the site.)

div.moduletable_termsofuseNEW

and/or

div#TermzNew

Both of the above wrap around the text Terms of Use.

(Not sure of the advantage of styling a link within a div# or a div. -- so I put them both in!)

Rowby
0
Industry Leaders: 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!

 
LVL 15

Accepted Solution

by:
ludofulop earned 500 total points
ID: 34939014
try this:

div.moduletable_termsofuseNEW a
{
 color: white;
 text-decoration: underline;
}
0
 
LVL 9

Author Closing Comment

by:Rowby Goren
ID: 34939157
Thanks.  That worked.

I assume it's best (or it's the only way) to control it via a CLASS (.) rather than and id (#)???

Rowby
0
 
LVL 15

Expert Comment

by:ludofulop
ID: 34939207
in this case it does not matter...
choosing between class and id is up to you, and also depends on your layout
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

738 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