Grow your CSS skills. Land your dream job.

change background of tr when I checked checkbox next to it

  • # November 28, 2012 at 12:27 am

    I wonder how to do this

    I have table with data and in the td of it contain checkbox

    I want when i checked this change backgroung of tr

    ??

    # November 28, 2012 at 1:15 am

    Can you put some code in Codepen for us?

    # November 28, 2012 at 1:33 am

    http://codepen.io/anon/pen/nysDl

    check box is under delete
    I want when i check checkbox background of tr changed

    # November 28, 2012 at 4:43 am

    Not possible with pure CSS since there is no parent selector.

    # November 28, 2012 at 4:44 am

    Not unless they have the same parent.

    # November 28, 2012 at 12:49 pm

    but i see it in many sites !

    # November 28, 2012 at 1:49 pm

    Not sure why the use of jQuery is not allowed (did not see a “pure CSS” requirement?), so I’d go for this: http://jsfiddle.net/senff/j4nTf/

    # November 29, 2012 at 10:51 pm

    thx Sneff , you r gr8

    # November 30, 2012 at 12:18 am

    You’re welcome, name is SENFF though.

    # November 30, 2012 at 12:25 am

    Thx SENFF ^_^

    are u know themeforest !

    as I think about building wordpress theme for it ?

    can u advice me !

    # November 30, 2012 at 4:58 am

    > thx Sneff

    HAHAHAHA! This just had me laughing…

    # November 30, 2012 at 6:52 am

    > HAHAHAHA! This just had me laughing…

    It’s keyboard wrong , I am really sorry

    # November 30, 2012 at 8:17 am

    No worries, common mistake, happens all the time!

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".