blocks-019

CSS Blocks: Effect of Top Padding on Inline Layout

WeasyPrint

This browser

Assertion
Top padding on inline elements has no effect on layout.

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 Blocks: Effect of Top Padding on Inline Layout</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/009.xml" type="application/xhtml+xml">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#padding-properties">
 8   <meta name="assert" content="Top padding on inline elements has no effect on layout.">
 9   <style type="text/css">
10    /* reset everything to be sure we don't introduce oddities */
11    div { border: 0; padding: 0; margin: 0; line-height: 1;
12          display: block; width: 10em; }
13    span { border: 0; padding: 0; margin: 0; line-height: 1;
14           display: inline; white-space: nowrap; }
15 
16    /* the test */
17    body { margin-top: 12em; }
18    div { background: red; }
19    span.control { background: green; color: white; }
20    span.test { padding-top: 10em; }
21   </style>
22  </head>
23  <body>
24   <div>
25    <span class="test"><span class="control">There should be no red on this page.</span></span>
26   </div>
27  </body>
28 </html>