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

Rick Oller
Rick Oller
9,072 Points

Stuck: Build a Responsive Website - Advanced Techniques

The question says: Using the unique ID defined within the fitvid script ("#featured-video"), add the appropriate code to the div that contains the embedded video so it scales with the fluid layout.

Im pretty sure its referring to something in this:

<div class="container">
        <div class="grid_6 omega">
                <iframe src="http://player.vimeo.com/video/50610288?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0"></iframe>     
        </div>
    </div>

I have tried changing the div class "grid_6 omega" to an div id "featured-video", didn't work. I have tried putting the id "featured-video" in the iframe tag, didn't work. I have tried changing the container so that it has the div id is "featured-video"

I dont think its an issue in the style.css...

Thank you everyone who took the time to read my question. Love the site so far. -Jackson

3 Answers

Chase Lee
Chase Lee
29,275 Points

Add this to the div with the classes grid_6 and omega:

id="featured-video"

Like this:

<div class="grid_6 omega" id="featured-video">
Leslie Hui
Leslie Hui
3,330 Points

Yes! How did you get the code to work? The code will disappear when I type in code.

Chase Lee
Chase Lee
29,275 Points

Just go to the link above and do what they say.

Chase Lee
Chase Lee
29,275 Points

I did the code fences. The 4 spaces do not work for me.

Rick Oller
Rick Oller
9,072 Points

It worked, thanks for taking the time to help!

Chase Lee
Chase Lee
29,275 Points

Can you give a link to the code challenge. Also here is a thread on how to display code in the forum.

Rick Oller
Rick Oller
9,072 Points

Thank you for the response! here is the link to the code challenge: http://teamtreehouse.com/library/websites/build-a-responsive-website/advanced-techniques/flexible-videos-with-fitvidjs-2

Thanks for the thread link, I was wondering where my code went, I'll try typing that code again: ''' <body> <div class="container"> <div class="grid_6 omega"> <iframe src="http://player.vimeo.com/video/50610288?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0"></iframe>
</div> '''

having trouble getting the code to show up, but the code is right there in the link to the challenge. Thanks again!

Chase Lee
Chase Lee
29,275 Points

Not quotes. It's the key under the esc key.

Leslie Hui
Leslie Hui
3,330 Points

Add this to line 9 id="featured-video"

Rick Oller
Rick Oller
9,072 Points

Im not sure where your talking about, to me line 6 would be in the head tag which doesnt work...

I have tried wrapping div id=featured-video around every possible place in the html, but nothing has worked.

The question says "add the appropriate code to the div that contains the embedded video" , so I added the code within the iframe tag itself, around the iframe tag, and within and around every other div in the code. But none of these have worked so far, so I think I need a new approach. I dont think I need to go into the style.css sheet and edit any changes but I could be wrong since no editing in the html has worked yet...

Leslie Hui
Leslie Hui
3,330 Points

Sorry, it should line 9. A typo from me. The div with grid_6