fieldset-containing-block.html (978B)
1 <!DOCTYPE html> 2 <title>fieldset containing block</title> 3 <link rel=match href=fieldset-containing-block-ref.html> 4 <style> 5 p { margin: 0; height: 100px } 6 fieldset { position: relative; border: none; padding: 0; margin: 0; } 7 legend { padding: 0; width: 100px; height: 50px; background: lime; } 8 div { position: absolute; top: 0; width: 100px; height: 50px; background: lime; } 9 .behind { height:100px; top: 108px; background: red; } 10 11 .fixed-container { 12 filter: invert(); 13 overflow: hidden; 14 width: 200px; 15 height: 200px; 16 } 17 .fixed { 18 position: fixed; 19 width: 400px; 20 height: 100px; 21 background: linear-gradient(to right, #ff00ff 50%, #00ffff 50%); 22 } 23 .has-fixed { 24 width: 0px; 25 height: 0px; 26 } 27 </style> 28 <p>There should be no red.</p> 29 <div class="behind"></div> 30 <fieldset><legend></legend><div></div></fieldset> 31 32 <fieldset class="fixed-container"> 33 <legend class="has-fixed"><div style="position:fixed; width:0; height0;"></div></legend> 34 <div class="fixed"></div> 35 </fieldset>