Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Matt Trask
Matt Trask
10,027 Points

SVG objects

Everytime I come to this code challenge it never works for me. I copy down the code straight from the video and put it in the text editor and it says my syntax is wrong. I go to the codepen page and copy that code and put it in and it doesnt work either. Is anyone else having issues or did anyone find a solution? I dont wanna skip any exercise but this one is making me really frustrated.

8 Answers

Strange I just completed it using the following code

<object data="img/love-at-first-bite.svg" type="image/svg+xml">
    <!--[if lte IE 8 ]-->
        <img src="img/love-at-first-bite.svg" alt="Smells Like Bakin">
    <!--![endif]-->
</object>
Matt Trask
Matt Trask
10,027 Points

This is what I used off codepen.io and the syntax is "wrong"

<object data="http://www.smellslikebakin.com/responsive/img/logo.svg" type="image/svg+xml" class="logo">
            <!--[if lte IE 8 ]-->
              <img src="http://www.smellslikebakin.com/responsive/img/logo.gif" alt="Smells Like Bakin">
            <!--![endif]-->
        </object>

Matt Trask the above data url for the object is not the correct data url the code challenge is giving you to replace.

Matt Trask the above data url for the object is not the correct data url the code challenge is giving you.

Matt Trask
Matt Trask
10,027 Points

But even when I try to just mod the code in the challenge it still doesn't work

Matt Trask
Matt Trask
10,027 Points

It looks like you left off "class". Is that the only thing I see different?

I have also changed the object and image paths to img/love-at-first-bite.svg

Matt Trask
Matt Trask
10,027 Points

I see what you did. Thank you.

No problem glad to help.