position-relative-018.xht (1424B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Relative positioning and computed values when 'bottom' is set to 'auto'</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" /> 7 <link rel="match" href="position-relative-018-ref.xht" /> 8 9 <meta name="assert" content="Computed value of 'bottom' set to 'auto' is equal to negative 'top'." /> 10 <style type="text/css"> 11 .parent 12 { 13 width: 0.5in; 14 float: left; 15 } 16 div div 17 { 18 background: black; 19 height: 1in; 20 position: relative; 21 width: 0.5in; 22 } 23 #div1 24 { 25 bottom: auto; 26 top: 1in; 27 } 28 #div2 29 { 30 bottom: -1in; 31 top: auto; 32 } 33 </style> 34 </head> 35 <body> 36 <p>Test passes if there is only one filled black square.</p> 37 <div class="parent"> 38 <div id="div1"></div> 39 </div> 40 <div class="parent"> 41 <div id="div2"></div> 42 </div> 43 </body> 44 </html>