SVG in img element proportions not respected in ie9

To get more consistent scaling across browsers always ensure you specify a viewBox but leave off the width and height attributes on your svg element. I’ve created a test page for comparing the effect of specifying the different SVG attributes in combination with widths and heights specified in CSS. Compare it side by side in a few different browsers and you’ll see a lot of differences in the handling.

Leave a Comment