You are here: Test Case Description for applets within <object> tag > Test Case #7 for applets within <object>: relative height
Applets: OBJECT (relative height)
This test case tests the <object> tag with its height attribute which, similar to the <img> tag, explicitly specifies the height of the java applet. The height attribute can either be an absolute height using an integer value of pixels or a relative height using a relative percentage value.
If the height attribute of an <object> is using a relative height and if the height of its containing block is not specified explicitly (i.e., it depends on content height), then the height of the <object> will compute to "auto". When this case happens, then the height refers to the intrinsic height for <object> which is 0px. Therefore, if the height attribute of an <object> is using a relative height, then the height of its containing block should be specified explicitly.
Java Applet Dimensions Scaled Down (Reverse Scaling)
Original object (with an height of 80px)
Object height="75%" within a
<p> with a specified height of 400px
Object height="50%" within a
<p> with a specified height of 400px
Object height="25%" within a
<p> with a specified height of 400px
Object height="50%" within a <p> that has no
specified height, with an auto-height <p>
The last <object>, just above, should NOT BE DISPLAYED.