Sergiu Sergiu - 1 year ago 123
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 Source

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;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download