Preventing “double” borders in CSS

后端 未结 17 1536
梦毁少年i
梦毁少年i 2020-12-02 11:49

Say I have two divs next to each other (take https://chrome.google.com/webstore/category/home as reference) with a border.

Is there a way (preferably a CSS trick) to

17条回答
  •  旧巷少年郎
    2020-12-02 12:27

    My use case was for boxes in a single row where I knew what the last element would be.

    .boxes {
      border: solid 1px black  // this could be whatever border you need
      border-right: none;
    }
    
    .furthest-right-box {
      border-right: solid 1px black !important;
    }
    

提交回复
热议问题