SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Displaying .svg

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Location
    Melbourne, Australia
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Displaying .svg

    I'm trying to display a logo in .svg format in an html email (hence why my styling is inline below). The direct link to the logo works: http://www.wehi.edu.au/uploads/e-mail/WEHI_logo.svg and setting my img src to the local file on my computer also previews correctly in the browser, but when I set img src to the uploaded file, the browser preview shows a grey box! What have I done wrong? (Code below)

    Code:
    <img src="http://www.wehi.edu.au/uploads/e-mail/WEHI_logo.svg" alt="Walter and Eliza Hall Institute logo" title="institute logo" style="max-width:180px; max-height: 39px; padding-right:10px;">

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    The server may have disabled hotlinking (often via a .htaccess file). That's just a guess, but it the only thing I can think of.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Location
    Melbourne, Australia
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ralph, I'll try asking my IT team then. Good to know it might not just be my noob skills creating the issue!

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Yes, there are lots of hidden tripwires to make you feel inadequate in this game.

    Let us know what they say, It would be interesting to know.

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Location
    Melbourne, Australia
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    My IT team came back with this: http://www.w3schools.com/svg/svg_inhtml.asp

    Unfortunately as I'm writing an HTML email (and therefore am restricted to HTML4) I can only use embed with the object tag (which brings in the logo too big - it doesn't seem to recognise my dimension styles!) or link it with an <a href> tag, which doesn't seem to work when I nest it inside a website link.

    Looking further into the W3C link, it seems .svg isn't supported for IE8 and earlier perhaps I should switch back to a conventional .jpg anyway, as I think Outlook would therefore have a compatability issue?

  6. #6
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Location
    Melbourne, Australia
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Yes, there are lots of hidden tripwires to make you feel inadequate in this game.
    Just saw your reply! Lol to the tripwires, I think I've stumbled on every single one so far! My favourite one was when it took me about half an hour to work out why my colour styling wasn't coming through...only to realise I was using Australian spelling for the property *facepalm*

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by cheli View Post
    perhaps I should switch back to a conventional .jpg anyway
    Yes, HTML email is a pain, and forces you to use pretty old coding technques anyhow. There's no point fighting with SVG when you don't need to. Just go for JPG, GIF or a standard format like that.

    Quote Originally Posted by cheli View Post
    I was using Australian spelling for the property *facepalm*
    Facepalm indeed. I web design, it pays to learn US spelling.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •