I am looking to create a div that fits perfectly around a checkbox in order to customize its background color. However, my previous attempts have resulted in the pink div extending below the checkbox.
If you'd like to see the code and try it out yourself, check out this jsFiddle.
#checkbox{ margin:0px;
padding:0px;
opacity:0.5;}
#checkbox_wrapper{ background:pink;
float:left;}
<div id = "checkbox_wrapper" >
<input type="checkbox" id = "checkbox"/>
</div>