css - Internet Explorer 内联边框错误

标签 css internet-explorer-7

我有一个列表,每个列表元素都是内联的。我给 li a 元素添加了边框,但是除了第一行之外的每一行,它都去掉了边框和填充。它适用于除 Internet explorer 7 之外的所有浏览器。您有任何解决方案吗?

alt text http://www.freeimagehosting.net/uploads/88ca5acd54.jpg

<div class="container">
<ul>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 12</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 5</li>

    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 4</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 3</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 2</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 2</li>

    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 1</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 1</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 1</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 1</li>

    <li>
        <a class="temakor" href="*" >??</a>&nbsp;x 1</li>
    <li>
        <a class="temakor" href="*" >??</a>&nbsp;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/

相关文章:

javascript - Mootools Request() 每个 session IE9 只工作一次

javascript - 在 IE7 中禁用页面缩放 (jQuery/JS)

c# - 使用 MVC 和 Razor 在 div 中放置一个 css 类

javascript - 单击另一个元素时如何禁用元素?

css - 无法在 iframe 中使用 CSS '#' 符号

IE7 文档标准中的 CSS Float

html - 粘性页脚未在 IE7 中更新

css - 我们可以用 Ext.Carousel 来做这样的 UI 吗?

javascript - 使等宽文本尽可能大而不会导致溢出或换行

javascript - IE7 只滚动锚定在新窗口中