Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.