blocks-028.xht (1018B)
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: overconstrained horizontal box model and minimum widths</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/block/mozilla/002.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth"/> 8 <style type="text/css"> 9 .test { border-left: none; padding-left: 2em; width: 3em; padding-right: 2em; border-right: none; box-sizing: border-box; } 10 .control { border-left: none; padding-left: 0; width: 4em; padding-right: 0; border-right: none; } 11 body div { background: navy; height: 1em; } 12 </style> 13 </head> 14 <body class="body"> 15 <p>There must be a perfectly rectangular blue box below.</p> 16 <div class="test"></div> 17 <div class="control"></div> 18 </body> 19 </html>