Friday, May 11, 2007

Checkboxes & Internet Explorer


For some reason by default checkboxes in Internet Explorer(IE) have padding on them. This happens in both IE 7 & IE 6 and with IE 7 you can specify a style for a specific attribute (i.e. input[type = checkbox]) but not in IE6 so that solution just doesn't work with my web coding ideas.

One way I found with a little bit of tweaking works great and in all browsers.


<span style="width:13px;height:13px;"><input type="checkbox" name="f00" value="Y" style="margin:0;width:13px;height:13px;overflow:hidden" /></span>


If anyone else comes across this problem there you go :). Just a note, I do not use inline styles in my code, I am just being lazy when posting here.

0 Comments:

Post a Comment

<< Home