Archive for tag: CSS

Alternating row colors

 

<style type="text/css">
.color0 {  background-color: #E3E3E3; }
.color1 {  background-color: #F4F4F4; }
</style>

<%
Dim i
i = 0
do until objs.EOF
Response.Write("<tr class=""color" & i & """>")
for each x in objs.Fields
Response.Write("<td>" & x.value & "</td>")
next
Response.Write("</tr>")
i = 1 - i
objs.MoveNext
loop
%>