first-line-selector-016.xht (1212B)
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: Inline-block usage with :first-line</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" /> 7 <meta name="assert" content="The first line of an inline-block cannot be the first formatted line of an ancestor element." /> 8 <style type="text/css"> 9 .test 10 { 11 display: inline-block; 12 vertical-align:-100px; 13 } 14 div:first-line 15 { 16 background: green; 17 } 18 span, div:first-line 19 { 20 color: white; 21 } 22 div 23 { 24 color: red; 25 } 26 </style> 27 </head> 28 <body> 29 <p>Test passes if there is a box below and the word "FAIL" is not visible.</p> 30 <div> 31 <span class="test"> <br />Filler Text</span><br /><span>FAIL</span> 32 </div> 33 </body> 34 </html>