delete-block-in-inlines-middle-001.xht (1794B)
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" class="reftest-wait"> 4 5 <head> 6 7 <title>CSS Test: Delete a block-level element inside a block whose children are otherwise all inline at its middle</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/visuren.html#anonymous-block-level" title="9.2.1.1 Anonymous block boxes" /> 11 <link rel="match" href="delete-block-in-inlines-beginning-001-ref.xht" /> 12 13 14 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 15 <meta content="ahem dom" name="flags" /> 16 17 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 18 <style type="text/css"><![CDATA[ 19 div.container 20 { 21 background-color: fuchsia; 22 color: black; 23 font: 20px/1 Ahem; 24 margin: 1em; 25 } 26 27 div#target-node-to-delete 28 { 29 border-left: yellow solid 0.5em; 30 border-right: yellow solid 0.5em; 31 margin: 1em 0em; 32 } 33 ]]></style> 34 35 <script type="text/javascript"><![CDATA[ 36 function deleteABlockAtMiddle() 37 { 38 document.body.offsetHeight; 39 40 document.getElementsByClassName("container")[0].removeChild(document.getElementById("target-node-to-delete")); 41 42 document.documentElement.className = ""; 43 } 44 ]]></script> 45 46 </head> 47 48 <body onload="deleteABlockAtMiddle();"> 49 50 <p>Test passes if the 2 colorized rectangles are <strong>identical</strong>.</p> 51 52 <div class="container"> 53 <span>Several</span> <span>inline elements</span> are 54 <div id="target-node-to-delete">Block to remove</div> 55 <span>in this</span> sentence.</div> 56 57 <div class="container">Several inline elements are in this sentence.</div> 58 59 </body> 60 </html>