At ordinary times in order to write a JS effect, thus ignoring the nesting of the label, leading to the confusion of the IE6-7, In UL, directly nested Div, in IE7 versions earlier, will appear in the situation is: the DIV is wrapped in Li, which is closest to it.
See Dome
<Ul class = "Clearfix"> <li> 1 </LI> <li> 2 </LI> <li> 3 </LI> <li> 4 </LI> <li> 5 </LI> <Div class = "add"> <! -- This part will be loaded to Li with 5 text in IE7 and earlier versions. --> </Div> </ul>
CSS
<Style type = "text/CSS">. clearfix {display: inline-block; width: 100% ;}. clearfix Li {float: Left; padding: 5px; Border: 1px solid #999; width: 12%; List-style: none ;}. add {Background: #67bcd1; Height: 20px ;}</style>
Under Google
In IE7 document mode, the DIV is added to the Li closest to it.
So and UL do not support writing directly nested Div statements.
Div cannot be directly nested in UL (earlier than IE7)