【问题标题】:How can I set a border in alignment with other borders如何设置与其他边框对齐的边框
【发布时间】:2014-10-09 22:18:51
【问题描述】:

我有一个带有以下代码的主题:

    table.alt {
        border-collapse: separate;
    }

        table.alt tbody tr td {
            border: solid 1px #e5e5e5;
            border-left-width: 0;
            border-top-width: 0;
        }

            table.alt tbody tr td:first-child {
                border-left-width: 1px;
            }

        table.alt tbody tr:first-child td {
            border-top-width: 1px;
        }

        table.alt thead {
            border-bottom: 0;
        }

        table.alt tfoot {
            border-top: 0;
        }

当我将我的 css 添加到我的 html 时,边框没有正确对齐。我的代码是:

table.alt tr th.rightAlignBorderLeft {
    text-align: right;
    border-left: solid 1px #e5e5e5;
}

截图如下:

我不想将边框折叠设置为折叠,因为更改我的默认主题代码可能会弄乱我的页面。 我该如何解决这个问题?

编辑: 这是我的(新)小提琴:http://jsfiddle.net/ru1923mf/1/

【问题讨论】:

  • 你能分享一些html吗?没有它很难......
  • 感谢您的回答。 sudrap.org/paste/text/392202
  • @nikel 你能把相关的 HTML 贴在这里吗?
  • @nikel 你试过border-left:无;右边界:无;? (使用 none 而不是 0 也不是border-left-width)
  • 你能发个fiddle

标签: html css


【解决方案1】:

我已经解决了这个问题。我在这里找到了答案:http://css-tricks.com/forums/topic/how-can-i-set-a-border-in-alignment-with-other-borders/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-25
    • 1970-01-01
    • 2015-01-08
    相关资源
    最近更新 更多