position-absolute-semi-replaced-stretch-button.html (697B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789"> 3 <link rel="match" href="position-absolute-semi-replaced-stretch-button-ref.html"> 4 <title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title> 5 <style> 6 .cb { 7 position: relative; 8 border: 3px solid black; 9 height: 100px; 10 width: 150px; 11 display: inline-block; 12 vertical-align: top; 13 margin: 5px; 14 } 15 .abs { 16 margin: 0; 17 position: absolute; 18 box-sizing: border-box; 19 top: 3px; 20 right: 3px; 21 bottom: 3px; 22 left: 3px; 23 outline: 2px solid lime; 24 width: auto; 25 height: auto; 26 } 27 </style> 28 <div class="cb"><button class="abs">button</button></div>