I got this from
It addresses the TR tags within an ID'd TABLE without having to css class each TR or TD. If you read the thread of replies to the article there at alistapart, you will find about 5 different yet functional solutions... just pick what best suits you. I liked this one myself.
JimS.
=====================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Striped Tables</title>
<style type="text/css">
#playlist {
border: 1px solid #666666;
}
#playlist tbody tr td {
font-family: "lucida grande", verdana, sans-serif;
font-size: 8pt;
padding: 3px 8px;
border-left: 1px solid #D9D9D9;
}
/* Note: by placing this rule above the .selected rule
selected rows receive a style preference */
#playlist tbody tr.even td {
background-color: #edf3fe;
}
#playlist tbody tr.selected td {
background-color: #3d80df;
color: #ffffff;
font-weight: bold;
border-left: 1px solid #346DBE;
border-bottom: 1px solid #7DAAEA;
}
</style>
<script type="text/javascript">
onload = function() { stripe ('playlist') };
function stripe(id) {
var table = document.getElementById(id);
if (! table) { return; }
var trs = table.getElementsByTagName("tr");
for (var i = 0; i < trs.length; i += 2) {
trs
.className += " even";
}
}
</script>
</head>
<body onload="stripe('playlist', '#fff', '#edf3fe');"><a name="top"></a>
<div id="bottle">
<h1>iTunes Stripes</h1>
<table id="playlist" cellspacing="0">
<tbody>
<tr>
<td>1</td>
<td>Lost In The Plot</td>
<td>The Dears</td>
</tr>
<tr>
<td>2</td>
<td>Poison</td>
<td>The Constantines</td>
</tr>
<tr class="selected">
<td>3</td>
<td>Plea From A Cat Named Virtute</td>
<td>The Weakerthans</td>
</tr>
<tr>
<td>4</td>
<td>Melissa Louise</td>
<td>Chixdiggit!</td>
</tr>
<tr>
<td>5</td>
<td>Living Room</td>
<td>Tegan And Sara</td>
</tr>
<tr>
<td>6</td>
<td>Speed</td>
<td>Bran Van 3000</td>
</tr>
<tr>
<td>7</td>
<td>Fast Money Blessing</td>
<td>King Cobb Steelie</td>
</tr>
<tr class="selected">
<td>8</td>
<td>Sore</td>
<td>Buck 65</td>
</tr>
<tr>
<td>9</td>
<td>Love Travel</td>
<td>Danko Jones</td>
</tr>
<tr>
<td>10</td>
<td>You Never Let Me Down</td>
<td>Furnaceface</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
=====================================
JimS.
aka
TenTonJim
Looking for work
(in Florida???) I live in Washington State.