Solved

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

Posted on 2014-11-15
9
116 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
  • 5
  • 4
9 Comments
 
LVL 82

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 82

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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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 82

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 82

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 82

Expert Comment

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now