Solved

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

Posted on 2014-11-15
9
122 Views
Last Modified: 2014-11-16
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>
</td></tr></table>
<!-- Einde copyright -->


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

Greetings, Peter Kiers
0
Comment
Question by:peterkiers
[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
  • 5
  • 4
9 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40445357
Like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
<style type="text/css">
<!-- 
.footertable, .footertable a {
	background-color: #2555A2;
	font: 10px "Trebuchet MS", arial, sans-serif;
	font-weight: bold;
	color: #ffffff;
	}
-->
</style>
</head>
<body>
<!-- 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>
<a href="http://www.google.com">google.com</a>
</td><td align="right" valign="top">
<script language="JavaScript" type="text/javascript" src="java/copyright-allwebco.js"></script>
</td></tr></table>
<!-- Einde copyright -->

</body>
</html>

Open in new window

0
 
LVL 1

Author Comment

by:peterkiers
ID: 40445363
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
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40445369
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

0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 1

Author Comment

by:peterkiers
ID: 40445370
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
0
 
LVL 1

Author Comment

by:peterkiers
ID: 40445373
The color: #ffffff; gives alle the text in the table white but not the urls. In my case are displayed blue.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40445374
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="http://www.google.com">google.com</a> , that should work.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40445375
Try the code I posted.  It worked fine in Firefox here.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 40445379
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
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40445385
You're welcome, glad to help.
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

690 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