Strange padding in Safari when using SVG images

Posted by Naman Goel on Stack Overflow See other posts from Stack Overflow or by Naman Goel
Published on 2012-12-12T10:51:34Z Indexed on 2012/12/12 11:03 UTC
Read the original article Hit count: 280

Filed under:
|
|
|

I thought I was having issues with margins but then on a closer look I found that SVGs are acting funky in Safari 6. I am building a simple Hexagon based website. Of course I used negative vertical margins to for a little overlap to 'inter-lock' the hexagons. And to save space I was using SVG images for the hexagons.

It works great in chrome and firefox, but in Safari, there is a strange padding in the SVG images.

I'm using simple img tags for the svg images.

Everything works when I switch to PNG, but I'd prefer to stick to SVGs.

Any insight? Can I perhaps delve into the SVG code and somehow fix the SVG problem in Safari? or is it some sort of bug, that I can do nothing about without browser sniffing?

© Stack Overflow or respective owner

Related posts about css

Related posts about html5