How does it happen in IE6 the following list of Li blank spacing bugs, as follows:
Run
| 123456 |
<ul class= "List" > <li class= "list-item" ><a href= "#" > List blank Space bug</a></li> <li class= " List-item "><a href=" # > List blank spacing bug</a></li> <li class= "List-item" ><a href= "#" > List blank spacing bug</a></li> <li class= "List-item" ><a href= "#" > List blank spacing bug</a></li></ Ul> |
Run
| 1 |
. List-item A{display:block;} |
DEMO
As long as you set the child element of the list Li (the child element is an inline element, such as A,span), the block element will cause problems in IE6.
How to solve, as long as the haslayout to trigger IE can be resolved:
Set height (height:1%;) or width, display:inline-block;
It is also possible to set Li in the Display:inline element;
How to trigger IE's haslayout
- Position:absolute/inline-block;
- Float:left/right;
- Width: A value other than "Auto"
- Height: A value other than "auto", such as "height:1%;"
- Zoom: A value other than "normal"
- WRITING-MODE-TB-RL;
Transfer from http://jqc.me/?p=35
Set the left Li style to
Li{display:inline;} Problem solving
IE6 The following table Li blank spacing