float-replaced-width-004

Floated replaced elements with specified right margin

WeasyPrint

This browser

Flags
image
Assertion
If 'margin-right' is not computed as 'auto' its used value is as specified.

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 specified right margin</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#float-replaced-width">
 7         <meta name="flags" content="image">
 8         <meta name="assert" content="If 'margin-right' is not computed as 'auto' its used value is as specified.">
 9         <style type="text/css">
10             #div1
11             {
12                 border: solid black;
13                 height: 2in;
14                 width: 2in;
15             }
16             img
17             {
18                 background-color: blue;
19                 float: right;
20                 margin-right: 0.5in;
21                 height: 1in;
22                 width: 1in;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if the blue box is horizontally centered inside the black box.</p>
28         <div id="div1">
29             <img alt="blue 15x15" src="support/blue15x15.png">
30         </div>
31     </body>
32 </html>