max-width-108

max-width - float and overflow

WeasyPrint

This browser

Flags
ahem
Assertion
'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.

Source

 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 - float 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 name="assert" 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.">
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   }
23 
24   #test-red-overlapped
25   {
26   color: red;
27   float: left;
28   }
29 
30   #control-green-overlapping
31   {
32   clear: left;
33   color: green;
34   position: relative;
35   top: -200px;
36   }
37   </style>
38 
39  </head>
40 
41  <body>
42 
43   <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>
44 
45   <p>Test passes if there is a green square and <strong>no red</strong>. Such green square should have active horizontal and vertical scrollbars.</p>
46 
47   <div id="test-red-overlapped">XX</div>
48 
49   <div id="control-green-overlapping">XX</div>
50 
51  </body>
52 </html>