1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5
6 <title>CSS Test: max-width - height and overflow</title>
7
8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
9 <link rel="author" title="Hilbrand Edskes" href="http://edskes.com/">
10 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths">
11 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow">
12 <meta content="ahem" name="flags">
13 <meta content="'max-width' specifies a fixed maximum used width. If the used width is greater than max-width, then the computed value of max-width is used as the computed value for width." name="assert">
14
15 <style type="text/css">
16 div
17 {
18 font: 200px/1 Ahem;
19 height: 200px;
20 max-width: 200px;
21 overflow: auto;
22 position: absolute;
23 }
24
25 div#test-red-overlapped {color: red;}
26
27 div#control-green-overlapping {color: green;}
28 </style>
29
30 </head>
31
32 <body>
33
34 <p>PREREQUISITE: User agent needs to support scrollbars as the scrolling mechanism. If it does not, then this test case does not apply to this user agent.</p>
35
36 <p>Test passes if there is a green square and <strong>no red</strong>. Such green square should not have scrollbar(s).</p>
37
38 <div id="test-red-overlapped">XX XX</div>
39
40 <div id="control-green-overlapping">X</div>
41
42 </body>
43 </html>