Friday, June 26, 2009

checkbox margins in IE incorrect

By default, checkboxes have some margin and perhaps padding so they take up a bit more space than is needed. I needed to make some checkboxes take up the least amount of space possible, and the following css:

input {

didnt work in IE6 and IE7, while working perfectly in firefox (as usual).


Add the following IE only css:

<!--[if IE]>
<style type="text/css">
input {
margin: -5px;

This fixes the problem on IE6, and IE7, i dont know if IE8 has this problem or not.

No comments:

Post a Comment