blocks-016

CSS Block Box Model: sane horizontal box model and minimum widths

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3 <head>
 4   <title>CSS Test: CSS Block Box Model: sane 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/006.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">
 8   <style type="text/css">
 9    .container { width: 5em; }
10    .test { margin-left: 2em; border-left: none; padding-left: 0; width: auto; padding-right: 0; border-right: none; margin-right: 2em; }
11    .control { padding-left: 2em; }
12    div { font-size: xx-large; }
13   </style>
14  </head>
15  <body>
16   <p>The following two vertical bars should be at the same horizontal position.</p>
17   <div class="container">
18     <div class="test"><span>|</span></div>
19   </div>
20   <div class="control"><span>|</span></div>
21  
22 
23 </body>
24 </html>