Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

alternating row colors

Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
edited August 2013 in Vanilla 2.0 - 2.8

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

Answers

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited August 2013

    Yeah!!! Thank you, hgtonight!! :D:D This Vanilla Community is Awesome... ;)

    this did the Trick:

    .Item.Comment.Alt{ background-color:#EFFBF2; }

    I hope you're not annoyed by my "How to learn Programming":

    1. have an Idea
    2. Search for Solution in the Documentation or Web
    3. if not found, ask Community
      ;)))

    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... :D:D
    Okee... not as crazy as that, but im thrilled about every solution... ;)

    So THANKS AGAIN hgtonight, THANKS VANILLA COMMUNITY!! :D:D

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    From my (not so old) experiences with how easy it is to extend Vanilla, I'd suspect you'll get an alcohol problem soon... ;-)

  • Options

    don't forget you also have .Mine

    you can do subtle variations with .Mine and .Alt.Mine

    grep is your friend.

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited August 2013

    @Dr_Sommer said:
    ...

    This Vanilla Community is Awesome... ;)

    ...

    I'm not sure if it's common in the Programmers World, but every time i got an Solution ... im thrilled about every solution... ;)

    I agree. I get the same feeling when people react positively to my posts. :D

    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.

  • Options

    @Dr_Sommer said:
    every time i got an Solution, I'm jumping naked through my flat and celebrate this with a Beer...

    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.

  • Options
    Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Hehehe... Crazy bunch of Programing People... not liking it, LOVIN IT!!! :D:D

Sign In or Register to comment.