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]-->