It's common for websites to have embedded Youtube videos, and with Youtube now compatible on phones too. With the rise of responsive design, it only makes sense for iframes containing Youtube videos to also be responsive, right?
After spending days searching for a solution (as a newcomer to HTML/CSS), I couldn't find an easy answer to the problem. While adjusting iframe width is straightforward, maintaining relative height involved complex scripts in javascript, jQuery, and php - all intimidating for beginners in web design. What I needed was a simple way to keep an iframe's height proportional no matter how its width changed.
To ensure this question doesn't go unanswered, here's a method that worked:
<iframe src="//www.youtube.com/embed/example_url" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
That's all there is to it.
If anyone has alternative solutions, I'd love to hear them as well.