title: CSS-only way to set a div to 90% width and 3:1 aspect ratio
body: <p>I have a div that I want to set to 90% of its parent container's width,
  and I want its height to be set so as to achieve a specific aspect ratio, say 3:1.</p>
  
  <pre><code>.mydiv {
    width: 90%
    height: 30%(of-width);
  }
  </code></pre>
  
  <p>Is there any way to do this that does not involve JavaScript?</p>