代码之家  ›  专栏  ›  技术社区  ›  alex

IE7在不应该缩进文本的时候缩进了文本

  •  3
  • alex  · 技术社区  · 16 年前

    我有一些列表元素有一个神秘的左填充/边距。

    在Firefox中,它按预期显示。但在IE7中,有一个文本缩进或强制内部文本在大约4个空格内。请参阅上面的示例链接。

    我已经设定好了 padding margin text-indent 为0,以及 text-align: left .

    1 回复  |  直到 15 年前
        1
  •  9
  •   bendewey    16 年前

    在style.css文件中,将LIST-style-POSITION设置为内部。这导致您在IE中出现问题。

    #content-body UL {
        LIST-STYLE-POSITION: inside; LIST-STYLE-TYPE: disc
    }
    

    您可以删除该元素,也可以向.events UL添加样式

    .events UL {
        ...
        LIST-STYLE-POSITION: outside! important;
    }