CSS text repeat IE bug lead to strange copying of text

Source: Internet
Author: User
When multiple floating elements follow each other, the text within the last floating element is occasionally copied to the bottom of the note. Scientific name Duplicate characters Bug

Program code
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "//www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> One More pig </title>
<body>
<div style= "width:400px" >
<div style= "Float:left" ></div>
<!---->
<div style= "float:right;width:400px" >↓ that's the extra pig. </div>
</div>
</body>


Can be solved by the following methods:
1, do not place comments. The simplest and quickest way to solve
2. Do not place the note between 2 floating blocks.
3, the text block is included in the new <div></div>, such as: <div style= "float:right;width:400px" ><div>↓ This is the more out of the pig </ Div></div>.
4, remove the fixed width of the text block, and 3 have similarities.
5, some people add a <br after the pig/> or space, but only to eliminate the phenomenon.
6. Do not set the width of the floating element so that it does not reach the bottom of the containing element, or set Margin-right to the last element: -3px, or smaller.
7. Note This can be written:<!--[if! Ie]>put your commentary in here...<! [endif]-->

  • Related Article

    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.