Solved

How do I control link colors in a div class?

Posted on 2011-02-20
6
272 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
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…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now