Font colors within tables...Can you set them all at once?

They have: 75 posts

Joined: Mar 2000

Hello, I'm curious if it is possible to set the font color and or font type in a table(all the cells within that table) without having to put the html code into each and every individual cell.

Thanks for any help possible...

-Tallon-

-tallon

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Cascading Style Sheets separate form from function.

Using CSS you can specify many things without using the font tag.
www.inforamp.net/~suzanne/index/links.htm#css has some links for newbies as well as oldbies. Take a read through some of the resources to get a better idea of how it works.

In your case specifically, put the following in your HEAD tag:

<style type="text/css">
<!--
table, tr, td {color: #hexhex; font-family: verdana, geneva, sans-serif;}
//-->
</style>

Replace #hexhex with the hex value that you want for the table font colour, and use quotes around font names that are longer than one word.

hth,

Suzanne

------------------
Zero Cattle
Suzanne
Tables DeMystified

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.