IEBug-solution to double the distance between patches outside floating objects-Experience Exchange

Source: Internet
Author: User
IEBug -- Solution to double The distance of The patch outside The floating object The IE Doubled Float-Margin Bug IEBug -- double The distance of The patch outside The floating object

First read the following code:

# Box {
Background: ThreedFace;
Width: 500px;
Height: 400px;
}

# Box1 {
Float: left;
Background: # F2F2F2;
Width: 300px;
Height: 200px;
Margin-left: 50px;
}

Box is outside and Box1 is inside, but in IE browser, the Box1 is PX away from the left, and the actual distance is 50 PX.

The solution is,Add: display: inline; to the box1 code, so that float is ignored. IE does not produce double distance. For more information, see here.

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.