| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
| <html lang="en"> |
| <head> |
| <title>CSS Block Box Model: sane horizontal box model and minimum widths</title> |
| <style type="text/css"> |
| .container { width: 5em; } |
| .test { margin-left: 0; border-left: none; padding-left: 2em; width: auto; padding-right: 2em; border-right: none; margin-right: 0; } |
| .control { margin-left: 0; border-left: none; padding-left: 0; width: 5em; padding-right: 0; border-right: none; margin-right: 0; } |
| div { background: navy; height: 1em; } |
| </style> |
| </head> |
| <body> |
| <p>The following two DIVs should be the same width (resulting in a single 5 by 2 block).</p> |
| <div class="container"> |
| <div class="test"></div> |
| </div> |
| <div class="control"></div> |
| </body> |
| </html> |