Sergiu Sergiu - 5 months ago 34
CSS Question

Adding border to SVG image

Is it possible to wrap a SVG image inside a border (that is - putting a border from CSS around that image) .


Yes, just add border using css as you would with any element.

Using inline style:

<img src="test.svg" style="border: 1px solid black;" />

Using class:


<img class="framed" src="test.svg" />


.framed {
     border: 1px solid black;