floats-125

CSS Floats: 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 Floats: Bottom Padding on Inline Children</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/float/025.xml" type="application/xhtml+xml">
 7   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/025.html" type="text/html">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats">
 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; float: left; }
12    span { border: 0; padding: 0; margin: 0; line-height: 1; display: inline; }
13 
14    /* the test */
15    body { margin-top: 12em; }
16    div { background: red; }
17    span.control { background: green; color: white; }
18    span.test { padding-top: 10em; }
19   </style>
20  </head>
21  <body>
22   <div>
23    <span class="test"><span class="control">There should be no red on this page.</span></span>
24   </div>
25  </body>
26 </html>