All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Apply class to parent if child div contains class

  • # January 21, 2013 at 5:01 pm

    Okay I got it to work in the CMS! (I had to change some settings) I’m trying to use this same method to change a background color, but it doesn’t seem to work. At first I just thought that it was the CMS but I also can’t get it to work in JS fiddle.

    Is something incorrect?


    When sibling .lof-row is found it will add .blackred then CSS takes over from there. I’ve also tried to use the .closest selector but no joy.

    # January 24, 2013 at 3:23 pm

    I fixed it, thanks guys!

Viewing 2 posts - 31 through 32 (of 32 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed