Label colour
Apr. 3rd, 2012 12:35 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
HTML
<input type='radio' name='example' id='example1' value='1'> <label for='example1'>Option 1</label>
<input type='radio' name='example' id='example2' value='2'> <label for='example2'>Option 1</label>
CSS
Input label red when box unchecked, green when it is.
<input type='radio' name='example' id='example1' value='1'> <label for='example1'>Option 1</label>
<input type='radio' name='example' id='example2' value='2'> <label for='example2'>Option 1</label>
CSS
input[type=radio]+label { color: red } input[type=radio]:checked+label { color: green }RESULT
Input label red when box unchecked, green when it is.