Solved

How do I control link colors in a div class?

Posted on 2011-02-20
6
319 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
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!

 
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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…
Suggested Courses

631 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