CSS: borders between table columns only

前端 未结 10 1608
有刺的猬
有刺的猬 2020-12-07 20:11

Is there a way, using CSS, to show borders in a table between columns only (not on the outer edges)?

10条回答
  •  天涯浪人
    2020-12-07 20:30

    There's no easy way of doing this, other than doing something like class="lastCell" on the last td in each tr, and then setting your css up like this:

    #table td {
        border-right: 5px solid red
    }
    
    .lastCell {
        border-right: none;
    }
    

提交回复
热议问题