position-relative-027.xht (1641B)
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: Relatively positioned elements with auto positioning with anonymous boxes before and after</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" /> 8 <link rel="match" href="position-relative-027-ref.xht" /> 9 10 <meta name="assert" content="Relatively positioned element with auto positioning appear as though they were positioned in flow." /> 11 <!-- 12 " 13 If both 'left' and 'right' are 'auto' (their initial values), 14 [then] the[ir] used values are '0' (i.e., the boxes stay 15 in their original position). 16 (...) 17 If both [top and bottom] are 'auto', [then] their used values are both '0'. 18 " 19 http://www.w3.org/TR/CSS21/visuren.html#relative-positioning 20 --> 21 22 <style type="text/css"> 23 div 24 { 25 width: 5in; 26 } 27 span 28 { 29 bottom: auto; 30 left: auto; 31 position: relative; 32 right: auto; 33 top: auto; 34 35 } 36 </style> 37 </head> 38 <body> 39 <p>Test passes if the 3 "Filler Text" are on the same line.</p> 40 <div> 41 Filler Text <span>Filler Text</span> Filler Text 42 </div> 43 </body> 44 </html>