CSS – Table Design

CSS

table.tableDesign{
	border-collapse: collapse;
	border: 1px solid lightgray;
}
table.tableDesign thead tr th{
	background: #5B7778;
	font-size: 11px;
	padding: 5px 10px 5px 10px;
	font-weight: bold;
	color: white;
	border: 1px solid lightgray;
}
table.tableDesign thead tr th a{
	color: white;
	text-decoration: none;
}
table.tableDesign tbody tr td{
	padding: 2px;
	font-size: 11px;
	border: 1px solid lightgray;
}
.odd {
	background-color: #f2f6c3; }
.odd td {
	border-bottom: 1px solid #cef; }
.even {
	background-color: #fbffd4; }
.even td {
	border-bottom: 1px solid #cef; }

Sample Table

Header 1
Body 1

JavaScript

<script type='text/javascript'>
 $(document).ready(function(){
 $("tr:odd").addClass("odd");
 $("tr:even").addClass("even");
 });
</script>

Tags:

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.