Tutorials Bugs Masterclass Free stuff Test pages Proposals

Core tests

Advanced tests

This test

RichInStyle.com test pages: boxes - max-width

This has max-width: 50%; margin-left: 20%; margin-right: 20%. As a result, it should look the same as the following element, which as margin-left: 20%; margin-right: 30%, since the result of max-width is to re-do the box model equation with that value for max-width.

This should look the same as the preceding element.

This has a max width of 100 pixels. As a result, it should appear as a 100 pixel block - the same as that below.

This has a width of 100 pixels. As a result, it should appear as a 100 pixel block - the same as that above.

This has a max width of 100 pixels and a set width of 100 pixels. As a result, it should appear the same as that above.


This has a max width of 50%. As a result, it should appear the same as that below.

This has a width of 50%. As a result, it should appear the same as that above.


Some text that is boring.
Some text that is boring.

The first of the two examples above should result in a width of 0 because max-width: -100px is not illegal and therefore will not be ignored. It will therefore look the same as the next element. The second, however, has width: -100px, which is illegal, and which will therefore be rendered as width: auto, that is to say with the same width as this element.

Some text that is boring.