padding-applies-to-016

CSS Tables: Bottom Padding on Inline Children

WeasyPrint

This browser

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: CSS Tables: Bottom Padding on Inline Children</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 7   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/table/013.xml" type="application/xhtml+xml">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#padding-properties">
 9   <style type="text/css">
10    /* reset everything to be sure we don't introduce oddities */
11    table { border: 0; border-spacing: 0; padding: 0; margin: 0; line-height: 1; }
12    td { border: 0; padding: 0; margin: 0; line-height: 1; }
13    span { border: 0; padding: 0; margin: 0; line-height: 1; display: inline; }
14 
15    /* the test */
16    body { margin-top: 12em; }
17    table { background: red; }
18    span.control { background: green; color: white; }
19    span.test { padding-top: 10em; }
20   </style>
21  </head>
22  <body>
23   <table>
24    <tr>
25     <td>
26      <span class="test"><span class="control">There should be no red on this page.</span></span>
27     </td>
28    </tr>
29   </table>
30  </body>
31 </html>