I have a flash stuff on a web page, which height I want to control basing on parent's explicitly set height. Width should be recalculated to preserve proportions - as it happens when dealing with <img>
tag:
<div>
<object>
<embed src="..."> <!-- no attributes except src -->
</object>
</div>
<style>
div { height: 300px; }
object, embed { height: 100%; }
</style>
Instead of expected behaviour I get the flash of absolutely other size: it is much smaller than it's parent in all dimensions. Actually, I don't understand why it takes this particular size - it looks too small (like zoomed out few times).
To make it to behave in a proper way I have to set both width and height for explicitly. It may be done both inline and in CSS.
The question is: why doesn't it calculate height (though it obviously has enough data - <img>
can resize properly at the same conditions) based on parent's height and given percentage?.
(Initially I've had many other attributes (including duplicated width and height on both and tags) which all I removed to simplify the example. While doing that, I was checking whether removement changes anything and it didn't except of width and height attributes.)