IE6 in resolution float: 3 pixel bug

Source: Internet
Author: User

In a typical float, as shown in the following picture: The gray rectangle is the outer container, the green container floats to the left in the outer container, and the floating part surrounds the float. However, when parsing such a float, IE6 adds a 3-pixel margin to the floating portion of the tightly floated part. To be more intuitive, let's make a comparison between Firefox and IE6 (above is the effect in Firefox, the following figure is the effect in IE6):

You will see clearly the 3 pixel margin bug in the IE6. To determine whether it's 3 pixels, I zoomed in Photoshop to 1600%, as shown in the screenshot below, which is 3 pixels.

How to solve this bug?

If the bug doesn't affect your layout, you can make it go with the wind. However, if the layout is affected or you can't tolerate a little flaw, just indent the right margin of the floating part by 3 pixels to the left, using hack only for IE.

1 * html .float{ margin-right: -3px; }


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.