CSS2 Test Suite: 10.5 height

[index page] [section] [Previous] [Next] [Specification]

The style declarations contained within this page:

.cl1 {height: 50px;}
.cl2 {height: 50%;}
.cl2contain {height: 80px; border: 1px dotted gray;}
.cl3 {height: 150px; background: yellow;}


The following image has no class, and is provided as a reference point for the tests to follow.

[image]

The following image has a class of 'cl1', and should be 50 pixels tall. Since the source image is square, it should also be 50 pixels wide.

[image]

The following image has a class of 'cl2', and should be its intrinsic height, since its parent element (the 'body') does not have an explicitly assigned height. Since the source image is square, the width of the image should equal its height.

[image]

The following image has a class of 'cl2' and is contained in a 'div' with a class of 'cl2contain'. The image should be half the height of the content-height of 'cl2contain'. Since the source image is square, the width of the image should equal its height.

[image]

This 'p' element contains a 'span' element that has a class of 'cl3'. The 'span' is here: [cl3]. Since height does not apply to inline non-replaced elements, the 'span' should not be 150 pixels tall. If the 'span' is 150 pixels tall, the test has been failed.


[index page] [section] [Previous] [Next] [Specification]