floats-152.xht (913B)
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: Positioning of floats in tables: zero-width floats with negative outer width</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/052.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" /> 8 <link rel="match" href="floats-150-ref.xht" /> 9 10 <style type="text/css"> 11 body { padding: 2em 12em; } 12 td { padding: 0; background: red; } 13 div { width: 0; float: right; margin-left: -10em; color: white; } 14 </style> 15 </head> 16 <body> 17 <p>Test passes if there is <strong>no red</strong>.</p> 18 <table> 19 <tr> 20 <td> 21 <div>FAIL</div> 22 </td> 23 </tr> 24 </table> 25 </body> 26 </html>