I want to grey/stripe every two rows in a row. Its hard to explain. Here's a picture::
|-^-^-^-^-^-|
|-^-^-^-^-^-|
|-------------|
|-------------|
|-^-^-^-^-^-|
|-^-^-^-^-^-|
|-------------|
|-------------|
|-^-^-^-^-^-|
|-^-^-^-^-^-|
|-------------|
|-------------|
Like this? http://jsfiddle.net/GQNUV/1/
table tr:nth-child(4n-1), table tr:nth-child(4n) {
background: #ccc;
}
Change this to your preference, it should work
tr:nth-child(4n+1) { color: green; }
tr:nth-child(4n+2) { color: green; }
tr:nth-child(4n+3) { color: red; }
tr:nth-child(4n+4) { color: red; }
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