Friday, February 5, 2010

IE6: Removing Padding on Input Checkbox

If you've ever put a background on an input checkbox and viewed it in IE6, you'll notice there is padding around the checkbox. Other browsers don't have this padding, and it can ruin designs if not dealt with.

An easy way to get rid of the padding through CSS is by adding these styles to the checkbox:

margin:0; width:13px; height:13px; overflow:hidden;

Doing this will not affect any other browser (at least modern ones) and will fix your IE6 issues.

No comments: