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
Solved

How do I control link colors in a div class?

Posted on 2011-02-20
6
301 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Title # Comments Views Activity
Refresh div via ajax without lost ccs <li> styles 8 48
Help to align the buttons in a row 2 43
Place text over image using CSS 6 52
How to show span when clicked on? 10 31
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

828 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