Object dislocation in Div

Source: Internet
Author: User

As follows:

<Div style = "width: 1000px;"> <Div style = "float: Right; width: 490px;"> right </div> <Div style = "width: 490px; "> left </div>

Sometimes, in some browsers (such as Microsoft's ie series), the right and left are not in one line, but are misplaced and each occupies one line. However, the sum of their widths does not result in such explosive growth.

Things in the world are so amazing. When I want to break my head, I add a hop border, and they will return to the normal state:

<Div style = "width: 1000px; Border: solid 1px red;"> <Div style = "float: Right; width: 490px; "> right </div> <Div style =" width: 490px; "> left </div>

It seems that sometimes the browser may also have a short circuit, without drawing a border line, it does not know that it is inside the box.

If it is hard to see the border, you can set the border color to the same color as the background color.

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.