What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Pure CSS change parent Object?

Terra

New member
Hello!

I have a little Problem.
How i can change the Background Color of the next "Test" if i click the Checkbox IN the Label Box ?

HTML:
<label for="id1">
    <input id="id1" type="checkbox">
</label>

<div class="test">
    test
</div>

<label for="id2">
    <input id="id2" type="checkbox">
</label>

<div class="test">
    test
</div>

Thanks!
Terra
 
Back
Top