Sujana's suggestion did not work for me either. I managed to get around the problem but placing the svg in an svg file (mysvg.svg) and then including it in my html file:
<object data="mysvg.svg" type="image/svg+xml" width="1200" height="800"> <embed src="mysvg.svg" type="image/svg+xml" width="1200" height="800"/> </object> The above worked on Chrome, FF, Safari, and Opera. Best, Helen --- In svg-developers@yahoogroups.com, "David Dailey" <ddailey@...> wrote: > > Hmmm.. Sujana's suggestion doesn't do it for my Safari: (5.04, windows) > > > > The following works in FF4, Chrome and IE9: > > > > <!DOCTYPE HTML> > > <html> > > <body> > > <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"> > > <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" > /> > > </svg> > > </body> > > </html> > > > > Notes: > > 1, the doctype is needed, as I understand it, to get IE9 out of quirks > mode. > 2. The simpler xmlns= rather than xmlns:svg seems to work > > 3. adding xmlns:xlink="http://www.w3.org/1999/xlink" as per Sujana's > suggestion doesn't do anything in my six browsers (the five mentioned, plus > ASV). > > 4. I didn't expect ASV to do it. All tricks I've ever seen for doing SVG > inline in HTML within ASV are terribly idiosyncratic and would (I think) be > hopeless in other browsers. > > > > I can't seem to get Safari or Opera to render the SVG in this manner. So > some questions: > > > > 1. What does the spec say about this? > > 2. Which spec (HTML or SVG) would address the issue? > > 3. Is there another trick of some sort for getting Opera and Safari to > play this game? > > 4. While I've heard it claimed that Safari is just Chrome but a few > month behind, my experiments seem not to confirm this. There are cases in > which Chrome has done things for more than a year that remain broken in > Safari (maybe the periodicity of my observations just coincides with the > frequency of bug oscillations in Webkit hence masking an actual lag > function?) Likewise I have seen things that Safari does well for which > Chrome fails. Is the theory that Safari is simply a retarded version of > Chrome (pardon the language, but you know what I mean) accurate when it > comes to SVG or is the story a bit more complicated than that? > > Cheers > > David > > > > From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com] > On Behalf Of SujanaRajendran > Sent: Saturday, April 16, 2011 10:38 AM > To: svg-developers@yahoogroups.com > Subject: [svg-developers] Re: Problem viewing SVG (in HTML) on Safari > > > > > > Hi Helen, > > Try this code... > > <html> > <body> > <svg xmlns="http://www.w3.org/2000/svg" > xmlns:xlink="http://www.w3.org/1999/xlink"> > <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" > /> > </svg> > </body> > </html> > > Sujana. > > --- In svg-developers@yahoogroups.com > <mailto:svg-developers%40yahoogroups.com> , "helen_volos" > <hstephanopoulos@> wrote: > > > > Safari does not render the following code (Chrome and Firefox render it on > Mac): > > > > <html> > > <body> > > <svg width="400" height="400" xmlns:svg="http://www.w3.org/2000/svg"> > > <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" > fill="green" /> > > </svg> > > </body> > > </html> > > > > I would greatly appreciate if you can point out what is missing from the > above. > > > > Thanks, > > > > Helen > > > > > > > > [Non-text portions of this message have been removed] > ------------------------------------ ----- To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: svg-developers-dig...@yahoogroups.com svg-developers-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: svg-developers-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/