I am wanting to create a border like the one below, but not sure how I can go about this with CSS, can anyone help?
Current code which has the button that i want this style on.
<li class="nav-item button">
<a class="nav-link" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
</svg>
</a>
</li>
I have tried using borders, with an outline, also tried borders followed by :before to try and get this working but to no avail.
2
Answers
I’m not matching your button exactly, but enough to give you an idea on how to do it.
I use border for the white part. Then outline for the outer thin line.
You may also use shadows to draw bg and outside red circle while you set a transparent border:
possible example: