HTML CSS examples for CSS Layout:Flex
Flexbox grid with multiple size flex items
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> flex-container {<!-- w w w .jav a 2 s. c o m--> display:flex; } flex-item { flex-grow:2; height:201px; margin:0 6px; display:flex; flex-direction:column; } .big { flex:0 0 41%; background-color:Chartreuse; } div { flex-grow:2; background-color:yellow; } div + div { margin-top:11px; } </style> </head> <body> <flex-container> <flex-item> <div></div> <div></div> </flex-item> <flex-item class="big"></flex-item> <flex-item> <div></div> <div></div> </flex-item> </flex-container> <br> <hr> <br> <flex-container> <flex-item class="big"></flex-item> <flex-item> <div></div> <div></div> </flex-item> <flex-item> <div></div> <div></div> </flex-item> </flex-container> </body> </html>