Tuesday, May 20, 2008

Remove checkbox padding/space in IE

By default IE6 and IE7 add some space (few pixels) around the checkbox. I tried adding overflow: hidden; padding: 0px; margin: 0px; float: left; and even more - nothing helped. Only defining its height would work.

In order to remove that space try adding height and width styles

<input style="height: 1em; width: 1em;" type="checkbox">

This should work ok on IE6, IE7, Safari, FF

No comments: