border inside the button

Who can help? I got a button. But how can I get that border inside of the button?
3 Replies
Jochem
Jochem3y ago
easiest solution is to stack a border and outline https://codepen.io/jochemm/pen/QWVrMwL alternatives include adding an extra element with the same background color and a bit of padding, or a box-shadow
Rianẍa
RianẍaOP3y ago
Thx!
Squidgical
Squidgical3y ago
want to add an alternative, you can use an outline and offset it to be within the edges of the element by giving a negative value https://developer.mozilla.org/en-US/docs/Web/CSS/outline-offset
outline-offset - CSS: Cascading Style Sheets | MDN
The outline-offset CSS property sets the amount of space between an outline and the edge or border of an element.

Did you find this page helpful?