This is something that drove me crazy for a long time, finally I came up with this solution. I tested it in IE6, FF2 and Chrome and it rendered same pixel by pixel in all the three browsers (also browsershots.org confirmed the result for other browsers), hope this post help you avoid the headache I had been through.
<style type="text/css">
*
{
padding: 0px;
margin: 0px;
}
#wb
{
width: 15px;
height: 15px;
float: left;
}
#somelabel
{
float: left;
padding-left: 3px;
}
</style>
<div>
<input id="wb" type="checkbox" /><label for="wb" id="somelabel">Web Browser</label>
</div>
* If you don't want to set the padding and margin to zero for all elements as I did here, you could only set them for the label and checkbox.
Saturday, December 27, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment