左边框是分离/折叠布局,中心布局

时间:2015-01-10 09:33:15

标签: css sass

我想把这个分页集中在一起

然而左边界超出预期

page link

如何解决?

https://i.imgur.com/e7RZgrL.png

样式表

.pagination a, .pagination span.current, .pagination span.gap {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: white;
    border-color: #ddd;
    border-image: none;
    border-style: solid;
    border-width: 1px 1px 1px 0;
    line-height: 0;
    padding: 0 14px;
    text-decoration: none;
}
.pagination {
    border-left: 1px solid #ddd;
    display: block;
    margin-top: 40px;
    text-align: center;
}

1 个答案:

答案 0 :(得分:0)

您正在向块包装器添加左边框:

.pagination {
    border-left: 1px solid #ddd;
}

相反,您应该将其添加到第一个内部元素:

.pagination > span:first-child {
    border-left-width: 1px;
}