1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <title>CSS Test: Absolute Positioning: width:auto with block width:50%</title>
5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/003.html" type="text/html">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">
8 <style type="text/css">
9 p { color: green; }
10 .a, .b { position: absolute; }
11 .inner { background: red; height: 2em; }
12 .a { top: 4em; }
13 .a .inner { width: auto; }
14 .b { top: 8em; }
15 .b .inner { width: 50%; }
16 </style>
17 </head>
18 <body>
19 <p>There should be no red on this page.</p>
20 <!-- both should shrink wrap to 0, and 100% of 0 is 0. -->
21 <div class="a"> <div class="inner"> </div> </div>
22 <div class="b"> <div class="inner"> </div> </div>
23 </body>
24 </html>