Link to home
Create AccountLog in
Avatar of Peter Kiers
Peter KiersFlag for Netherlands

asked on

How to specify all urls in a certain tabel to be the color white

Dear Experts,

I use a table on my site connected to a class called footertable in the CSS.
What I would like is all the url's specified in that table to give the color white
How can I do that?

<!-- Begin copyright -->
<table cellpadding="0" cellspacing="6" border="0" width="100%" class="footertable"><tr><td align="left" valign="top">
<script language="JavaScript" type="text/javascript" src="java/copyright.js"></script>
</td><td align="right" valign="top">
<script language="JavaScript" type="text/javascript" src="java/copyright-allwebco.js"></script>
<!-- Einde copyright -->

.footertable            {
                  background-color: #2555A2;
                  font: 10px "Trebuchet MS", arial, sans-serif;
                  font-weight: bold;
                  color: #ffffff;

Greetings, Peter Kiers
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Peter Kiers


Hi Dave, that not what I ment. The url's are specified in the javascripts which are loaded in the tabel, and the table is connected with the css class footertable. What I would like is the urls that are in de javascripts which is displayed in the table to get the color white. How can I do that? Peter
What I posted should do exactly that.  I don't have your javascript so I just put a static URL in there for test.  If your javascript writes the data to the <td> where it is already located, then the CSS for that <td> and <a href..> should apply.  Did you notice that I added something to your CSS?
.footertable, .footertable a {

Open in new window

In other words in de css-class footertable has to be specified that all urls in that table must get the color white.

Greetings, Peter Kiers
The color: #ffffff; gives alle the text in the table white but not the urls. In my case are displayed blue.
That's what adding ".footertable a" to the CSS does.  It tells the browser to apply that CSS to all <a> tags in that class.  As long as your javascript is generating standard links like <a href=""></a> , that should work.
Try the code I posted.  It worked fine in Firefox here.
Oh yes, how dumb of me. I really didn't see the diffirence in the code you have send me. It works great now thank you very much. Greetings, Peter Kiers
You're welcome, glad to help.