CSS2 Test Suite: 10.4 max-width

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

The style declarations contained within this page:

.test {background-color: silver;}
.cl1 {width: 250px; max-width: 50%;}
.cl2 {max-width: 500px;}

[test cl1] This 'p' element has been set to have a width of 250px, but a maxmum width of half its parent element's content-width. Thus its width should be 250 pixels, unless the parent element is 500 pixels or narrower, in which case this element will be half as wide as its parent's content-width.

[test cl2] This 'p' element has been set to have a maximum width of 500px. Thus its width should never be wider than 500 pixels, no matter how wide its parent element's content-width may become.

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