Sergiu Sergiu - 1 month ago 9
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) .

Answer

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:

HTML

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

CSS

.framed {
     border: 1px solid black;
}