background-position-applies-to-013d.xht (1726B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: Background-position applied to elements with 'display' set to 'table'</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties" title="14.2.1 Background properties: 'background-color', 'background-image', 'background-repeat', 'background-attachment', 'background-position', and 'background'" /> 11 <link rel="match" href="background-position-applies-to-001b-ref.xht" /> 12 13 <meta name="flags" content="image" /> 14 <meta name="assert" content="The 'background-position' property applies to elements with 'display' set to 'table'." /> 15 16 <style type="text/css"><![CDATA[ 17 div#table 18 { 19 background-image: url("/css/support/60x60-red.png"); 20 background-position: bottom right; 21 background-repeat: no-repeat; 22 display: table; 23 } 24 25 div#tbody {display: table-row-group;} 26 27 div.tr {display: table-row;} 28 29 div#top-left 30 { 31 border-top: transparent solid 60px; 32 display: table-cell; 33 } 34 35 div.td 36 { 37 display: table-cell; 38 width: 60px; 39 } 40 41 div#green-overlapping 42 { 43 border-bottom: green solid 60px; 44 display: table-cell; 45 } 46 ]]></style> 47 48 </head> 49 50 <body> 51 52 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 53 54 <div id="table"> 55 <div id="tbody"> 56 <div class="tr"><div id="top-left"></div><div class="td"></div></div> 57 <div class="tr"><div class="td"></div><div id="green-overlapping"></div></div> 58 </div> 59 </div> 60 61 </body> 62 </html>