Solved

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

Posted on 2014-11-15
9
121 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

739 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