stackOverlord
stackOverlord

Reputation: 5402

Disable alternating table row colors

I added this css rule tr { background-color:transparent; } to make all my rows have transparent backgrounds, but for some reason the even rows are still light blue. I looked in the chrome debugger and the rule is active, but checking/unchecking it doesn't affect the color. The odd rows change colors fine. What's going on here?

Upvotes: 1

Views: 3688

Answers (3)

stackOverlord
stackOverlord

Reputation: 5402

Nvm I added this line following the Ruby on Rails Tutorial.

 <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>

I deleted it and now its working.

Upvotes: 0

Andreas Eriksson
Andreas Eriksson

Reputation: 9027

The first thing you should do is check where and how the even rows are assigned a class/color to differentiate them. Then remove it. Trying to override it instead is pretty bad.

Upvotes: 1

Chris C
Chris C

Reputation: 2013

Transparent is the default value of background-color if you do not set one. It just lets the element inherit the color/background from its parent. You should override the even rows with a solid color.

However, with what you described, we cannot tell what other colors are in the table. You only mentioned light blue for the even rows.

Upvotes: 1

Related Questions