I'm using Ruby on Rails. I have a .sass file for a datagrid. I'd like every other row to have a different colored background.
I tried this:
tr:nth-child(2n+1)
background-color: #E3E3E3
What should it be?
Thanks
This is generally what's used to every-other items:
tr:nth-of-type(odd) {
background-color:#E3E3E3;
}
For me that works:
[hauleth@NIUNIOBOOK] ~ $ sass
tr:nth-child(2n+1)
background-color: #E3E3E3
^D
tr:nth-child(2n+1) {
background-color: #e3e3e3; }
So what do you wanna get other?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With