我想弄清楚为什么边框向外延伸得如此之多,而不是从数字开始。
http://kansasoutlawwrestling.com/
模型: http://kansasoutlawwrestling.com/assets/images/wrestling2.jpg
<div id="sidebar_left">
<a href="#"><img src="assets/images/ad.png" alt="Spotlight Wrestler"/></a>
<div id="top5">
<ol>
<li>Joe Smith</li>
<li>John Michaels</li>
<li>Steve Hart</li>
<li>Bret Hogan</li>
<li>Undertaker</li>
</ol>
</div>
</div>
#sidebar_left{width:300px;float:left;}
#sidebar_left img {}
#top5 ol li {padding:11px 0 11px 0;border-bottom:solid 1px gray;}
#top5 ol li:last-child{border:none;}
最佳答案
LI 会是链接吗?尝试将文本设为链接或只是一个跨度,然后将边框放在该元素上。向左/右添加填充,这样它就不会紧贴文本的边缘。如果您希望所有线条的宽度都相同,请为父级 ul 指定一个宽度。
查看我的模型:http://jsfiddle.net/2kJJE/1/
关于html - OL李的下面怎么加边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8059374/