css - ul 元素中的文本和图标之间没有空格

标签 css internet-explorer-7

我对 ie7 和 ul 列表元素有点问题。

在 ie8/9 和 firefox 中,图标和文本之间有一个额外的空白区域:

enter image description here

不幸的是,在 ie7 中它看起来是这样的:

enter image description here

ul 列表的样式:

margin-top: 5px;
    list-style-image: url('../Images/listItem10.png');
    list-style-position: inside;
    padding-left: 5px; 
    font-weight: bold; 
    float: left;

不幸的是,任何为它创建黑客的尝试都不起作用。 请提出任何建议,我该如何实现它。

最佳答案

........................

你好,现在习惯于 background image 而不是 list-style-image

margin-top: 5px;
    list-style:none;
background:url('../Images/listItem10.png') no-repeat 0 0;
    padding-left: 5px; 
    font-weight: bold; 
    float: left;

关于css - ul 元素中的文本和图标之间没有空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12526231/

相关文章:

php - 如何防止 CSS 中的 Div 换行?

javascript - IE7 中的圆形悬停区域

jquery remove 不隐藏 ie6 和 ie7 中的已用空间

html - CSS 没有背景图片,有什么想法吗?

css - 水平滚动在 ie7 中不起作用

html - 链接有时在 IE 中不起作用

c# - IE7 上的 .aspx 页面 Response.BinaryWrite 图像

jquery - 显示 : table dosen't work in ie6 & ie7

html - 如何使用 HTML/Angular 元素在浏览器中链接和查看 PDF?

html - 为什么在 div 上使用的 font-size 属性会影响 div 的宽度和高度?