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
Joe Hirst
Courses Plus Student 6,489 PointsPlease help. Advanced Techniques Flexible Videos with FitVid challenge.
Either i'm not understanding this process or the question, perhaps both. Ive tried renaming the .container and class to no avail, adding in a new <div> for the "Featured-video" etc.. I just cant seem to nail this.
I either get the response "null" or "make sure you are using the correct id for the container"
Im really bewildered by this challenge, any help would be a godsend.
I'm not partially looking for an answer, maybe just some helpful advice or hints? I'd like to be able to "get it" you know?
Here is the question, and the HTML.
"Using the unique ID defined within the fitvid script, add the appropriate code to the div that contains the embedded video so it scales with the fluid layout."
<div id="featured-video">
<div class="grid_6 omega">
<iframe src="http://player.vimeo.com/video/50610288?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0"></iframe>
</div>
</div>
Thanks in advance for any helpers out there! :)
21 Answers
Rodrigo Muñoz
Courses Plus Student 20,171 PointsType the Div with the id="featured-video" around the iframe code. Don't type the other Div with the grid_6
John Locke
9,450 PointsHere's a hint: In the Javascript below all the regular markup, there's an id(#) already in place, ready to go. Hope that helps.
Robert Manolis
Treehouse Guest Teachergood hint without just giving it away. nice!
ecp
838 PointsHey @Joseph
I'm actually having difficulty figuring out which code challenge you're stuck on, despite all the info you gave! (Sorry) mind shooting me a screenshot with your answer + code challenge to help@teamtreehouse.com ?
Thanks a bunch! If we don't figure it out, I'll get ya connected to someone who can ;)
Joe Hirst
Courses Plus Student 6,489 PointsHey @John,
I've tried using Id="featured-video" in my <div>. I vet the comment "null" when I check my work though. Perhaps there is something I'm still missing...
Joe Hirst
Courses Plus Student 6,489 Points@Elizabeth,
I'll shoot an email over to you now. :)
Mark Flavin
10,199 PointsAre you using $('#featured-video') as the selector?
Joe Hirst
Courses Plus Student 6,489 Points@Mark,
I am, or at least I believe I have... No matter what I try i am getting "null" as the result when i high "check my work"....
Can anyone actually explain the process to me please? Im pretty lost on this now. :(
Daniel Sullivan
5,187 PointsWas there a solution to this thread? I am stuck in the same spot, tried everything you tried.
-Dan
James Barnett
39,199 Points@Daniel -
For us to help you better ...
- Post a link to the Code Challenge and the step you got stuck on
- Create a "working" example of your code using codepen.io
Daniel Sullivan
5,187 PointsDaniel Sullivan
5,187 PointsWorking example. http://codepen.io/dsully360/full/wgBkA
Daniel Sullivan
5,187 PointsThank you guys for the help, not sure if I followed the last past from @Rodrigo? Can you clarify if possible?
Rodrigo Muñoz
Courses Plus Student 20,171 PointsThe first div is with class container. The second div is using the grids class and then add id="featured-video". The video will be fixing with the grid_6 not with the .container
Daniel Sullivan
5,187 PointsPerfect, that helped a lot. I didn't realize the div would have an ID and a class.
Thanks,
Dan
Nathaniel Perez
5,987 PointsWow this one had me stumped. Now I see you needed to add the id"featured-video" to the grid_6. Thanks a lot you guys!!!! ;)
James Power
8,561 PointsQuestion in Code Challenge needs to be clarified a little more. Following the steps in the video tutorial won't let you pass the Code Challenge, even though the code itself is correct.
Jay Cecrle
2,221 PointsI am still having an issue getting past the code challenge as well. I put in http://codepen.io/anon/pen/yphwr
The video scales fine, but I keep getting: "Make sure you're adding the correct ID to the iframe's container". Not sure what I am missing here.
James Barnett
39,199 PointsJay -
I noticed 3 things with your codepen.
- You added the id to the wrong div.
To quote Rodrigo from his answer above.
The first div is with class container. The second div is using the grids class and then add id="featured-video". The video will be fixing with the grid_6 not with the .container
- You forgot to close a
<div>
I often use a text editor with syntax highlighting, that will show me the matching tags to track down such errors.
- You didn't successfully link to fitvid in your codepen, so the video in your pen wouldn't successfully resize.
In your pen you used script src="jquery.fitvids.js"></script> codepen has no automagical way of finding the jquery.fitvid.js file you intended to use. Instead you need to provide the absolute path to it, like how you did for the JQuery library.
If you are still having issues, post a link to your updated codepen, in your own thread and we'll try to get you straightened out.
Mod Note: Remember the rule of thumb your issue, your code, your thread
Jay Cecrle
2,221 PointsGot it to work. I was misreading @Rodrigo did not understand what was meant. Once I added my id="featured video" after class="grid_6_omega" I was good to go. Thanks for the prompt response!
branco design
5,120 Points<div id="featured-video" class="grid_6 omega">
<iframe src="http://player.vimeo.com/video/50610288?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0"></iframe>
</div>
</div>
Corbin Briske
3,308 PointsCould someone paste the answer? I've tried everything suggested, but I have yet to get it working. Here's my codepen: http://codepen.io/anon/pen/yphwr