float-replaced-height-001

Floated replaced elements with 'margin-top' and 'margin-bottom' as 'auto'

WeasyPrint

This browser

Flags
image
Assertion
A floated replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.

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: Floated replaced elements with 'margin-top' and 'margin-bottom' as 'auto'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height">
 7         <meta name="flags" content="image">
 8         <meta name="assert" content="A floated replaced elements' used value of 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'.">
 9         <style type="text/css">
10             div
11             {
12                 border-bottom: solid orange;
13                 border-top: solid orange;
14                 line-height: 0;
15                 width: 1in;
16             }
17             img
18             {
19                 margin-top: auto;
20                 margin-bottom: auto;
21             }
22             div, img
23             {
24                 float: left;
25             }
26         </style>
27     </head>
28     <body>
29         <p>Test passes if there is no white space between the blue box below and the orange lines.</p>
30         <div>
31             <img alt="blue 15x15" src="support/blue15x15.png">
32         </div>
33     </body>
34 </html>