Profile

CodeBits

Page Summary

Expand Cut Tags

No cut tags
lithiumdoll: (Default)
[personal profile] lithiumdoll
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[type=radio]+label {
	color: red
	}
		
input[type=radio]:checked+label {
	color: green
	}
RESULT
Input label red when box unchecked, green when it is.

Syndicate

RSS Atom

Style Credit

Page generated Sep. 24th, 2017 11:58 am
Powered by Dreamwidth Studios