1, in the IE7 and the following version, the UL can not appear in the non-Li tag, if the appearance of non-Li tags, then the browser will automatically put the non-Li tag with its proximity to the Li tag wrapped, become the content of Li.
Yesterday did a page, IE7 and IE6 did not carry out the test, the results of the business report problem, given the problem page screenshot, a look to know, should be IE problem, with IE8 access no problem, but IE7 and IE6 have problems, carefully look at the code, found no problem, Then use the IE development tool to view the browser parsed HTML structure, found the problem, the problem HTML structure is as follows:
Original HTML:
<ul class= "Demo" >
<li> This is an example </li>
<li> This is an instance of </li>
<li> This is an example </li>
<li> This is an example </li>
<li> This is an example </li>
<div class= "" > This is the UL deposit in a div</div>
</ul>
IE7 after parsing:
IE8 after parsing:
By comparing the IE7 with the IE8, you can see that the normal effect should be like IE8, but IE7 has a different effect, and then compare the two parsed HTML code can be seen, IE7 under the div embedded in Li, and IE8 according to the development of the code will be displayed in the outside of Li. I thought I was in the operating process less write Li close tag, but carefully compared to the code found no problem, from the effect and parse out of the HTML, it should be IE7 does not support the UL directly nested non-LI tags. IE6 under the test also like IE7, so IE6 also is not supported.
Through the network to find relevant information can be reached the same conclusion, can be more confirmed that this is the problem of IE analysis.