OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>CSS Basic User Interface Test: box-sizing:border-box and CSS2.1 10.3.7</t
itle> |
| 4 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> |
| 5 <link rel="help" href="https://drafts.csswg.org/css-ui-3/#box-sizing"> |
| 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-
width"> |
| 7 <meta name="flags" content=""> |
| 8 <link rel="match" href="reference/box-sizing-001-ref.html"> |
| 9 <meta name="assert" content="When box-sizing is border-box, the content width, r
ather than the computed value of the width property, |
| 10 should be used in the the constraint that determine
s the used values of sizing and positioning properties |
| 11 of absolutely positioned elements."> |
| 12 <style> |
| 13 #cb { |
| 14 position: absolute; |
| 15 width: 100px; |
| 16 height: 100px; |
| 17 } |
| 18 #test { |
| 19 position:absolute; |
| 20 box-sizing: border-box; |
| 21 margin-right: 5px; |
| 22 margin-left: auto; /* should resolve to 25px, but would resolve to -25px
if the wrong interpretation of width is used in CSS2.1 10.3.7 */ |
| 23 top: 25px; |
| 24 left:0; |
| 25 right:0; |
| 26 padding-left: 25px; |
| 27 padding-right: 25px; |
| 28 width: 70px; |
| 29 height: 70px; |
| 30 background:green; |
| 31 } |
| 32 </style> |
| 33 <body> |
| 34 <p>Test passes if there is a <strong>filled green square</strong> and <strong>
no red</strong>.</p> |
| 35 <div id="cb"> |
| 36 <div id="test"></div> |
| 37 </div> |
| 38 </body> |
OLD | NEW |