Preventing “double” borders in CSS

后端 未结 17 1520
梦毁少年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:31

    Add the following CSS to the div on the right:

    position: relative;
    left: -1px; /* your border-width times -1 */
    

    Or just remove one of the borders.

提交回复
热议问题