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

HTML

Question about swapping out svg image

I seem to be experiencing a problem within the last task, flexible images part one vector graphics. Ive entered this code below:

      <object data="img/love-at-first-bite.svg" types="image/svg=xml" class="chart">
        <a href="img/img/love-at-first-bite.svg"> 
        </object> 
      </a>

 </div>

7 Answers

Change svg=XML to svg+XML. :)

Also </object> should go after the </a>.

[[ed. note]] Added Markdown to fix code formatting

thanks for the reply, however still not working!

Noticed another mis-type. It's type not types.

I'd also move </a> before </object> as the anchor is nested inside the object.

Why is your href img/img/ not img/?

Make sure your closing object tag goes after the closing a tag. I'd show it here but Trehouse's code feature is not working.

Benjamin - Remember to use markdown so the forum will correctly format your code.

If you need a refresher on Markdown syntax, check out the link to the Markdown Cheatsheet, which is directly below the reply textbox.

I'm having trouble with this challenge as well. Here's mode code:

<object data="img/love-at-first-bite.svg" type="imgage/svg+xml">
<a href="img/love-at-first-bite.svg">
<!--if lte ie 8}-->
<img src="img/love-at-first-bite.gif" alt=”Love at First Bite>
<!--[endif]-->
 </a>
</object>

It seems to be working as it shows the svg image in the right column preview but it won't allow me to pass the question.

Check your spelling in your first line! <[...] type="...">

Hope it works for you!