title: How can I make the YouTube player scale to the width of the page but also keep the aspect ratio?
body: <p>I have a YouTube video I want to put on my web page.</p>
  
  <p>I want to scale the video to fit to a percent of the users browser but also to keep the aspect ratio. </p>
  
  <p>I have tried this:</p>
  
  <pre><code>&lt;iframe width="87%" height="315" src="http://www.youtube-nocookie.com/embed/dU6OLsnmz7o" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>But that does only make the player wider, not higher.</p>
  
  <p>Does I have to resort to JavaScript (or non-standard CSS)?</p>