?
Solved

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

Posted on 2014-11-15
9
Medium Priority
?
124 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 1000 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
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

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

801 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