width-replaced-element-001

Scaling replaced elements with a width specified can scale the image

WeasyPrint

This browser

Flags
image, may
Assertion
Replaced elements width may be scaled by the user agent when the value of the property is not 'auto'.

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: Scaling replaced elements with a width specified can scale the image</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#the-width-property">
 7         <meta name="flags" content="image may">
 8         <meta name="assert" content="Replaced elements width may be scaled by the user agent when the value of the property is not 'auto'.">
 9         <style type="text/css">
10             div
11             {
12                 position: relative;
13             }
14             div div
15             {
16                 background: orange;
17                 height: 15px;
18                 width: 15px;
19             }
20             img
21             {
22                 position: absolute;
23                 left: 0.25in;
24                 top: 0;
25                 width: 1in;
26             }
27         </style>
28     </head>
29     <body>
30         <p>Test passes if the blue square is the same size or larger than the orange square.</p>
31         <div>
32             <div></div>
33             <img alt="blue 15x15" src="support/blue15x15.png">
34         </div>
35     </body>
36 </html>