[Solved] Add border using css ::after [duplicate]
There’s a lot of different ways you can achieve this effect, each with their own pros and cons (including how different properties affect document flow): Outline with negative offset .box { width: 100px; height: 100px; background-color: red; outline: 2px solid darkred; outline-offset: -7px; } <div class=”box”></div> Border and boxshadow .box { width: 100px; height: 100px; … Read more