root-box-001.xht (1158B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Placing the root element</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" /> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-11-06 --> 8 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/root/001.xml" type="application/xhtml+xml"/> 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#Computing_heights_and_margins" /> 10 <link rel="match" href="root-box-001-ref.xht" /> 11 12 <style type="text/css"> 13 html { margin: 1em; border: 1em solid red; padding: 0; background: green; } 14 body { margin: 0; border: 0; padding: 0; background: red; } 15 p { margin: -1em; border: 0; padding: 1em; background: white; } 16 </style> 17 </head> 18 <body> 19 <p>This text should be in a white box surrounded by green that extends 20 to all edges of the viewport.</p> 21 </body> 22 </html>