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

CSS

Flexible Images Part 1: Vector Graphics Code Challenge

Can somebody please provide me with the correct code for the mentioned code challenge as I am quite confused about why mine will not work

<object data="img/logo.svg type="image/svg+xml" class="chart">
   <a href="img/logo.svg">
      <img src="img/logo.gif" alt="Smells Like Bakin'">
   </a>
Andrew Shook
Andrew Shook
31,709 Points

If you show your code it will be easier for someone to spot what your bug is, when you paste your code in make sure that each line is indented four spaces, otherwise the forum won't show it.

2 Answers

Andrew Shook
Andrew Shook
31,709 Points

Could we get a moderator's help please.

The code still doesn't work, even the one the moderator gave. I even copied it from the Smells Like Bakin Website and it doesn't work

Don't worry it is working now

Andrew Shook
Andrew Shook
31,709 Points

I believe the problem is the img tag you have nested in the a tag. You need to remove it or add in the if lte IE 8 html comment. if you go back and look at the video at time 2:53 you will see what I am talking about. In fact the only thing you need to pass the code challenge is the object html tag.