我在使用Internet Explorer 8的CSS中使用list-style-image属性时出现问题
如果我设置
li {
float:left;
list-style-image: none;
}
每个菜单项都在彼此之上。如果我删除list-style-image:none,它们就完全定位了,但它们有点图像。 (见图片)
答案 0 :(得分:1)
由于您将float:left
设置为<li/>
并设置为内部<a/>
,因此列表元素会崩溃。没有必要;从float:left
移除<a/>
可以解决问题。
对于列表项目符号,如前所述,list-style-type:none
是可行的方法。
特别是对于IE8,我还建议删除line-height:0
中的#block-menu-primary-links
。它可能会导致崩溃行为。
注意:我真的不明白@orokusaki的建议。试过没有position:relative;
,它运作得非常好。