flexbox-abspos-child-001b.html (1539B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <title>CSS Test: Testing that "min-width", "max-width", "min-height", and "max-height" are applied on absolutely positioned children of a vertical flex container</title> 9 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 10 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#abspos-items"> 11 <link rel="match" href="flexbox-abspos-child-001-ref.html"> 12 <meta charset="utf-8"> 13 <style> 14 .flexContainer { 15 display: flex; 16 flex-direction: column; 17 height: 10px; 18 width: 10px; 19 background: purple; 20 margin-bottom: 15px; 21 position: relative; 22 } 23 .absPos { 24 position: absolute; 25 background: teal; 26 } 27 .testMinWidth { 28 width: 10px; 29 height: 20px; 30 min-width: 20px; 31 } 32 .testMaxWidth { 33 width: 50px; 34 height: 20px; 35 max-width: 20px; 36 } 37 .testMinHeight { 38 width: 20px; 39 height: 10px; 40 min-height: 20px; 41 } 42 .testMaxHeight { 43 width: 20px; 44 height: 50px; 45 max-height: 20px; 46 } 47 </style> 48 </head> 49 <body> 50 <div class="flexContainer"><div class="absPos testMinWidth"></div></div> 51 <div class="flexContainer"><div class="absPos testMaxWidth"></div></div> 52 <div class="flexContainer"><div class="absPos testMinHeight"></div></div> 53 <div class="flexContainer"><div class="absPos testMaxHeight"></div></div> 54 </body> 55 </html>