max-height-109

max-height - overflow

WeasyPrint

This browser

Flags
ahem
Assertion
The 'max-height' property can restrain the used value of height when the used value of height is greater than the declared max-height.

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-height - 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-heights">
11   <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow">
12   <meta content="ahem" name="flags">
13   <meta content="The 'max-height' property can restrain the used value of height when the used value of height is greater than the declared max-height." name="assert">
14 
15   <style type="text/css">
16   div#red-parent
17   {
18   background-color: red;
19   max-height: 400px;
20   overflow: auto;
21   }
22 
23   div#green-child
24   {
25   color: green;
26   font: 200px/1 Ahem;
27   }
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 wide green rectangle across the page; such green rectangle should have an active horizontal scrollbar. There should be no wide red rectangle.</p>
37 
38   <div id="red-parent">
39    <div id="green-child">XXXXXXXXXXXXXXX</div>
40   </div>
41 
42  </body>
43 </html>