Question about maintaining proportions of a block element set to 100% height
Let's say I have a rectangular container (for instance, a <div>) filling the width of the screen ("100%") but with a very specific height ("450px").
This wrapper contains a block element -- let's say a <span> -- that needs to fill 100% height at all times, while maintaining a very specific aspect ratio for the width (so for the sake of argument, let's say 16:9). Since the container is 450px high, the proportionate width would be 800px -- however, I'd rather not have to specify that manually.
Because the wrapper's height will be changing according to screen resolution, and it would simplify things if I could just change this one property (ie, the wrapper's height) and have the child's code be responsive to that.
Crude example :
<div style="width:100%; height:450px" id="wrapper">
<span style="display:inline-block; height:100%; width:???" id="child"></span>
</div>
If the <span> was an <img>, the task would be easy, by using style="height:100%; width:auto" because the file itself contains the fallback aspect ratio. But in the case of a <span> or a <a>, the browser is flying blind. There has to be some sort of equation in the 'width' to go along with that 100% height telling it to go 16:9.
Note that I don't even know if this is doable without witchcraft or sorcery, I could literally be asking the impossible.
Thanks!
