background-position-091.xht (1534B)
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: Background-position using 'ex' units with a nominal value, 7.5ex</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="ahem image" /> 9 <meta name="assert" content="The 'background-position' property correctly applies a nominal length value in 'ex' units." /> 10 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 11 <style type="text/css"> 12 div 13 { 14 font: 20px/1 Ahem; 15 height: 1in; 16 } 17 #div1 18 { 19 border: 3px solid orange; 20 width: 135px; 21 } 22 div div 23 { 24 background-image: url("support/black15x15.png"); 25 background-position: 7.5ex; 26 background-repeat: no-repeat; 27 width: 140px; 28 } 29 </style> 30 </head> 31 <body> 32 <p>Test passes if the black square below is vertically centered and on the right inner edge of the orange box.</p> 33 <div id="div1"> 34 <div></div> 35 </div> 36 </body> 37 </html>