Solved

How do I control link colors in a div class?

Posted on 2011-02-20
6
307 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
  • 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

Independent Software Vendors: 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

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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…

679 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