You are here: Very simple CSS question on table row color « HTML « IT news, forums, messages
Very simple CSS question on table row color

Posted by * Tong * on 11/26/62 11:17

Hi,

I have a very simple question on defining table row colors in css. Here is my test file:

test.htm:

- - - - >8 - - - -
<head>
<title>Test</title>
<link rel='StyleSheet' href='table.css' type='text/css'/>
</head>
<body>
<table>
<tr>
<th>cl</th><th>c2</th>
</tr>
<tr class="row1">
<td class="col1">1</td>
<td class="col2">2</td>
</tr>
<tr class="row0">
<td class="col1">3</td>
<td class="col2">4</td>
</tr>
<tr class="row1">
<td class="col1">5</td>
<td class="col2">6</td>
</tr>
</table>
</body>
- - - - >8 - - - -

And table.css:

- - - - >8 - - - -
th { bgcolor="#FFDB4A" }
..row1 { bgcolor="#EFEFEF" }
..row0 { bgcolor="#FFFFFF" }
tr.row1 { bgcolor="#EFEFEF" }
tr.row0 { bgcolor="#FFFFFF" }
- - - - >8 - - - -

I want my table show up with nice colors, but I just can't get it works.
What I'm missing?

Another simple question, how can I make my table border to be thin black
lines (in css)?

Thanks a lot!

--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
- All free contribution & collection

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация