Direct:
Cause: The div contains content that is printed on the background, and output by the print operation. If you do not output anything, the browser will default to the blank area.
In IE6, 7, when the browser resolves the rendering, it is assumed that the whitespace is also a placeholder , by default it has the attributes of the font, so there is a "redundant placeholder" bug.
Workaround:
First, let the HTML tag phase output. such as:<div></div>. --Too much trouble, code is irregular, not good maintenance.
Second, set up font-size:0; --Not perfect fix~
Second, use the comment <!---->. For example:<div><!----></DIV>, so there are no whitespace characters in the middle of the div. -This can fix the problem, but not good enough
Third, use <wbr> label . such as:<div> <wbr><div>. --This allows the browser not to automatically add whitespace to the contents of the tag, and no extra information appears on the page, perfect solution ~
Additional knowledge:
WBR Tags: function is soft line, the browser will be based on the width of the container, the text content to automatically break
Compatibility:
View URL: http://www.quirksmode.org/oddsandends/wbr.html
IE6, 7, the existence of blank characters between HTML tags, resulting in the use of extra white space after rendering, and how to solve