alternating row colors
Hi..
for readabillity reasons, i would like alternating row colors.
http://caba.de/CaBaFoRuM/index.php?p=/discussion/1819/cabas-kettenmarathon-guinness-weldrekord-2012
I found over Firebug, that the Class names of the Rows are:
class="Item Comment" for 1st row
and
class="Item Comment Alt" for the 2nd row
and the Container of them is named "Comment"
I know that i have to do this in my custom.css and i found this for changing the color:
tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}
here I'm stuck... ;(
class names are put in the CSS File as ".comment" and
.Comment{
background-color:#C0C0C0;
}
makes ALL Containers grey...
How to alternate the Container Colors, because i can't use the classes "Item Comment" and "Item Comment Alt", because they have spaces in the classes names...
Thanks in advance...
Best Answer
-
hgtonight MVP
Multiple classes on the same element are separated by periods on CSS selectors. Use
.Comment
and.Comment.Alt
as your selectors.Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
7
Answers
Multiple classes on the same element are separated by periods on CSS selectors. Use
.Comment
and.Comment.Alt
as your selectors.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Yeah!!! Thank you, hgtonight!! This Vanilla Community is Awesome...
this did the Trick:
I hope you're not annoyed by my "How to learn Programming":
))
I'm not sure if it's common in the Programmers World, but every time i got an Solution, I'm jumping naked through my flat and celebrate this with a Beer...
Okee... not as crazy as that, but im thrilled about every solution...
So THANKS AGAIN hgtonight, THANKS VANILLA COMMUNITY!!
From my (not so old) experiences with how easy it is to extend Vanilla, I'd suspect you'll get an alcohol problem soon... ;-)
don't forget you also have
.Mine
you can do subtle variations with
.Mine
and.Alt.Mine
grep is your friend.
I agree. I get the same feeling when people react positively to my posts.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Careful... Next thing you know is that V-doc is making a graphic of a naked doctor jumping around with a beer in his hand, heheh...
There was an error rendering this rich post.
Hehehe... Crazy bunch of Programing People... not liking it, LOVIN IT!!!
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌