Jules
Jules

Reputation: 14520

SVG is a scrollable object in Safari

Here's a page with an SVG graphic I designed. http://s383324595.onlinehome.us/HTML5-1 It looks and acts properly in Chrome (and Canary and Chromium), but the graphic itself is a tiny, square in Safari 5.1, and requires scrolling to see the whole image. What's wrong? Moreover, it looks like the graphic is on the offset on the X axis in Firefox. How can I fix that?

Upvotes: 1

Views: 1188

Answers (2)

Maciej Pyszyński
Maciej Pyszyński

Reputation: 9374

Safari don't understand float numbers as width and height on root SVG element. Make sure they are integers (round them up).

Upvotes: -1

Erik Dahlström
Erik Dahlström

Reputation: 60966

Remove the width and height attributes on the root <svg> element, then tweak the CSS for the embed element so that it gets the width and height you want.

Upvotes: 2

Related Questions