我有一个列表,每个列表元素都是内联的。我给 li a 元素添加了边框,但是除了第一行之外的每一行,它都去掉了边框和填充。它适用于除 Internet explorer 7 之外的所有浏览器。您有任何解决方案吗?
alt text http://www.freeimagehosting.net/uploads/88ca5acd54.jpg
<div class="container">
<ul>
<li>
<a class="temakor" href="*" >??</a> x 12</li>
<li>
<a class="temakor" href="*" >??</a> x 5</li>
<li>
<a class="temakor" href="*" >??</a> x 4</li>
<li>
<a class="temakor" href="*" >??</a> x 3</li>
<li>
<a class="temakor" href="*" >??</a> x 2</li>
<li>
<a class="temakor" href="*" >??</a> x 2</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
<li>
<a class="temakor" href="*" >??</a> x 1</li>
</ul>
</div>
CSS:
.container{
padding: 5px 10px;
width: 200px;
}
ul{
list-style-type: none;
}
li{
display: inline;
line-height:30px;
}
li{
color: #35a9e5;
font-weight:bold;
white-space:nowrap;
}
.temakor{
color:#a2a2a2;
background-color:#3B3B3B;
border:2px solid #678194;
padding:3px 10px;
}
最佳答案
填充对内联元素的作用与对 block 元素的作用不同。
关于css - Internet Explorer 内联边框错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3185295/