overflow-applies-to-015

overflow applied to elements with 'display' set to 'table-caption'

WeasyPrint

This browser

Flags
ahem
Assertion
The 'overflow' property does apply to elements with 'display' set to 'table-caption'.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: overflow applied to elements with 'display' set to 'table-caption'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow">
 8         <meta name="flags" content="ahem">
 9         <meta name="assert" content="The 'overflow' property does apply to elements with 'display' set to 'table-caption'.">
10         <style type="text/css">
11             #test
12             {
13                 border: 5px solid transparent;
14                 color: white;
15                 display: table-caption;
16                 font: 20px/1em Ahem;
17                 height: 5em;
18                 overflow: hidden;
19                 table-layout: fixed;
20                 white-space: nowrap;
21                 width: 5em;
22             }
23             #table
24             {
25                 display: table;
26             }
27             #row
28             {
29                 display: table-row;
30             }
31             #cell
32             {
33                 display: table-cell;
34                 white-space: nowrap;
35             }
36             #span2
37             {
38                 color: red;
39             }
40         </style>
41     </head>
42     <body>
43         <p>Test passes if there is no red visible on the page.</p>
44         <div id="table">
45             <div id="test"><span>XXXXX</span><span id="span2">XXXXX</span></div>
46             <div id="row">
47                 <div id="cell"></div>
48             </div>
49         </div>
50     </body>
51 </html>