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
Patrick McQuillan
2,219 PointsResizing Iframes using CSS?
My iframe is width="1280" height="720" on my page.
My mediaquery is not resizing it.
@media screen and (max-width:600px){
iframe { width= 560px ; height= 315px ;
}
}
3 Answers
Yorick Toma
742 PointsKeep in mind that an iFrame has its own viewport. Also you are writing CSS so it should be
iframe{
width: 560px;
height: 315px;
}
Stefano Bellasio
3,130 Pointswrong answer, sorry
Vince Brown
16,249 PointsUse Fitvids.js It does some crazy stuff with intrinsic ratios and wahh laaa fluid videos
Patrick McQuillan
2,219 PointsVery Neat! I will use this on another project for sure. This project I'm only using html and css.
Patrick McQuillan
2,219 PointsPatrick McQuillan
2,219 PointsI'm trying to make the video responsive.
http://pikamoo.github.io/