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

WordPress

David Jørgensen
David Jørgensen
4,668 Points

Responsive video with Bootstrap in WordPress

This is driving me insane - is there something in Bootstrap 3 that prevents YouTube video from being responsive? I've tried FitVids and FluidVids and nothing works. Anyone know what I'm missing?

6 Answers

Ricardo Diaz
Ricardo Diaz
30,415 Points

I understand but it sounds like the iframe isn't responsive and sort of like images you need to make it responsive. I haven't taken a look at B3 stylesheet since I use Foundation more but this article looks like it can help.

http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php

Ricardo Diaz
Ricardo Diaz
30,415 Points

I don't know what your code looks like but is the container or div that the video is in set up to be responsive? I think we can better help if you can show us what your code looks like.

David Jørgensen
David Jørgensen
4,668 Points

Hi Ricardo - I'm using Bootstrap 3 as the framework, so responsiveness is already there. All the elements on the page are responsive, except YouTube iframes.

David Jørgensen
David Jørgensen
4,668 Points

Thanks, that's a great link - I'll let you know how I get on!

David Jørgensen
David Jørgensen
4,668 Points

Thanks, that's a great link - I'll let you know how I get on!

David Jørgensen
David Jørgensen
4,668 Points

So... I need to take more care over my CSS. As Ricardo pointed out, the iframe needs be responsive.

.post iframe { max-width: 100%; }

Thank you, Ricardo!