我遇到了 IE7 列表元素错误的问题。和 的项目符号(或数字)显示在页边距之外。我该如何修复 IE 的这个问题?从我读到的内容来看,在 IE7 li 中指定高度/宽度时这似乎是一个问题。图片可以在这里找到:
Firefox:
IE7:
我有一个带有迈耶重置的样式表。
#create_request li {
display: list-item;
width: 313px;
height: 23px;
background-color: #E3E3E3;
list-style: decimal;
list-style-position: inside;
padding-left: 25px;
padding-top: 5px;
}
#create_request li.alternate {
background-color: white;
}
#create_left li:hover {
width: 356px;
background: url('/images/list_add.png') 100% 100% no-repeat;
background-color: #B0B0B0;
cursor: pointer;
}
从我读到的内容来看,在 IE7 li 中指定高度/宽度时这似乎是一个问题。
这是正确的。设置width
on <ol>
而不是<li>
并使用line-height
代替height
on the <li>
.
#create_request ol {
width: 313px;
}
#create_request li {
line-height: 23px;
...
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)