first-line-pseudo-009.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" lang="en"> 3 <head> 4 <title>CSS Test: CSS Block Box Model: first-line and inherited backgrounds</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Microsoft" href="http://www.microsoft.com/" /> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/first-line/009.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" /> 9 <style type="text/css"> 10 /* layout */ 11 .test { border: solid; margin: 1em; } 12 /* test */ 13 .runin { display: run-in; background: navy; color: yellow; } 14 .block { display: block; background: purple; color: white; } 15 .block:first-line { background: inherit; color: inherit; font-weight: bold; } 16 /* control */ 17 .fakerunin { display: inline; background: navy; color: yellow; font-weight: bold; } 18 .fakeblock { display: block; background: purple; color: white; font-weight: bold; } 19 </style> 20 </head> 21 <body> 22 <p>The following two lines should look identical (this test also tests run-in).</p> 23 <div class="test"> <div class="runin"> ABC </div> <div class="block"> DEF </div> </div> 24 <div class="test"> <div class="fakeblock"> <div class="fakerunin"> ABC </div> DEF </div> </div> 25 </body> 26 </html>