Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Zebra Stripes On Table Rows Using Rails / RHTML

DZone's Guide to

Zebra Stripes On Table Rows Using Rails / RHTML

·
Free Resource
<% @projects.each_with_index do |project, i| %>
<% row_class = i%2 == 0 ? "even" : "odd" %> 

......
<% end %>

In the CSS:

TR.even { background-color: #f00; }
TR.odd { background-color: #f00; }

etc..
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}