I was also thinking of media queries, but then I found this:
Just create a wrapper <div>
with a percentage value for padding-bottom
, like this:
div {_x000D_
width: 100%;_x000D_
padding-bottom: 75%;_x000D_
background:gold; /** <-- For the demo **/_x000D_
}
_x000D_
<div></div>
_x000D_
It will result in a <div>
with height equal to 75% of the width of its container (a 4:3 aspect ratio).
This technique can also be coupled with media queries and a bit of ad hoc knowledge about page layout for even more finer-grained control.
It's enough for my needs. Which might be enough for your needs too.