check box after a line of text, how to let them two side-by-side alignment, a few pixels of the problem, but the browser is not the same, especially IE6, the test solution is as follows, have similar problems with friends can refer to the following
For the front of a check box, the following text such arrangement, often see, but the problem is always a lot of, how to let them two side, sometimes is a few pixel problem, but each browser is not the same, especially IE6.
A solution to such problems was suddenly discovered today.
The general wording, the code is as follows
Copy Code code as follows:
<div>
<span>
<input type= "checkbox" id= "Haveread" name= "Haveread" style= "top:2px;"/>
<label onclick= "Clicktocheck ()" > I have read and agreed to <a href= "#" > "Chi Lok User Registration Agreement" </a></label></span>
</div>
There is a div at the very outside, but the two tags inside will be ranked according to their default style, not a check box higher than the text several pixels, or text above the check box.
At this point need to do is, the most outside of that Div positioning position:relative; The check box is positioned position:relative so that the check box style can be set by top and left to align.