How to horizontally align two objects by side to compatible IE6

Source: Internet
Author: User
Tags relative

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.