abspos-023

left:auto for fixed-pos blocks inside abs-pos blocks

WeasyPrint

This browser

Flags
may

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: left:auto for fixed-pos blocks inside abs-pos blocks</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 7   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/021.html" type="text/html">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">
 9   <meta name="flags" content="may">
10   <style type="text/css">
11    body { color: navy; }
12    .control { margin-left: 50%; border-top: 1em solid red; width: 1em; }
13    .container { position: absolute; left: 50%; }
14    .test { position: fixed; left: auto; width: 1em; height: 1em;
15            background: green; color: white; }
16   </style>
17  </head>
18  <body>
19   <p>There should be a green square roughly centered below and no red.</p>
20   <div class="container">
21    <div class="test"> </div>
22   </div>
23   <div class="control"></div>
24 </body>
25 </html>