CSS2 Test Suite: 10.2 width

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

The style declarations contained within this page:

.cl1 {width: 50px;}
.cl2 {width: 25%;}
.cl3 {width: 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 wide. Since the source image is square, it should also be 50 pixels tall.

[image]

The following image has a class of 'cl2', and should be one-quarter the width of its parent element (the 'body'). Since the source image is square, the height of the image should equal its width.

[image]

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


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