HTML CSS examples for CSS Form:input checkbox
Style check box as a rectangle which can change color
<html> <head> <title>Lorem ip</title> <style> input[type=checkbox] { display:none; } input[type=checkbox] + label { background:Chartreuse; height:17px; width:17px; display:inline-block; padding:0 0 0 0px; } input[type=checkbox]:checked + label { background:yellow; height:17px; width:17px; display:inline-block; padding:0 0 0 0px; } </style> <!--from ww w. j av a 2 s . c o m--> </head> <body> <p> <input type="checkbox" name="thing" value="valuable" id="thing"> <label for="thing"></label> </p> </body> </html>