floats-142.xht (981B)
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: Floats: negative margin test</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-08 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/042.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 9 <link rel="match" href="floats-142-ref.xht" /> 10 11 <style type="text/css"> 12 div { background: green; } 13 div p { margin-left: 10em; background: white; color: white; } 14 div p span { float: left; margin-left: -8em; } 15 </style> 16 </head> 17 <body> 18 <p>There should be a short green bar with no text in it.</p> 19 <div> 20 <p> FAIL <span></span> </p> 21 </div> 22 </body> 23 </html>