background-position-151

Background-position using 'inherit', inheriting two values

WeasyPrint

This browser

Flags
image
Assertion
The 'background-position' property correctly applies the two values that were inherited.

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: Background-position using 'inherit', inheriting two values</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#propdef-background-position">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
 8         <meta name="flags" content="image">
 9         <meta name="assert" content="The 'background-position' property correctly applies the two values that were inherited.">
10         <style type="text/css">
11             div
12             {
13                 background-repeat: no-repeat;
14                 height: 3in;
15                 width: 3in;
16             }
17             #div1
18             {
19                 background-image: url("support/background-position-bottom-center.png");
20             }
21             #div2
22             {
23                 background-position: 96px 192px;
24             }
25             #div2 div
26             {
27                 background-image: url("support/blue96x96.png");
28                 background-position: inherit;
29             }
30         </style>
31     </head>
32     <body>
33         <p>Test passes if there is no red visible on the page.</p>
34         <div id="div1">
35             <div id="div2">
36                 <div></div>
37             </div>
38         </div>
39     </body>
40 </html>