I have two divs, div.outer
and div.inner
:
<div class='outer'><div class='inner'>...content...</div</div>
div.outer
can be resized, both width and height independently. (Not by the user him-/herself.)
Inside this div is div.inner
with a width of 90% that of its parent div.outer
. This div has to have a aspect ratio of height / width = 1.24
. So the height must be 1.24 times larger than the width.
In other words, how do you set the height of a div equal to 112% the width of it's parent? (1.2 * 90 ≈ 112
) I'm looking for a solution in either Less or standard CSS. (Only javascript/jQuery if necessary).
Here in pseudo-CSS:
.outer{
width: resizable;
height: resizable;
}
.inner{
width: 90%;
height: 1.12 * width_of(.outer);
}
Thanks in advance.