How to apply css to table rows

raj02

New Member
I need to apply background color to the alternating rows of my html table.My current code:\[code\].licList { width: 100%; border: 1px solid #f7f7f7; text-align: center; border-collapse: collapse; } .licList th { font-weight: bold; background-color: #dbdbdb; border-bottom: 1px solid #f1f1f1; padding: 4px 5px; } .licList td { padding: 4px 5px; } .odd { background-color: #ffffff; } .odd td { border-bottom: 1px solid #cef; }\[/code\]and jquery is\[code\] $(document).ready(function () { $("licList:tr:odd").addClass("odd"); });\[/code\]I'm sure that the above jquery is not correct I've multiple tables in single page so I can't apply\[code\]$(document).ready(function(){ $("tr:odd").addClass("odd");});\[/code\]so my question is how to solve this problem????
 
Back
Top