HTML CSS examples for CSS Layout:Column Layout
get floated div columns to fill container vertically
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> * {<!--from w ww . j av a 2 s . co m--> -moz-box-sizing: border-box; -webkkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; } .main_wrap { margin: 20px; border: 3px solid black; width: 520px; } header, footer { margin: 5px; height: 50px; border: 3px solid silver; text-align: center; line-height: 50px; } .wrapper { margin: 5px; border: 3px solid green; display: flex; } .flex_wrap { display: flex; flex-direction: column; flex: 1; border: 2px solid blue; } .flex_column { display: flex; flex: 1; justify-content: center; align-items: center; border: 3px solid red; } .clear: after { clear: both; content:""; display: table; } </style> </head> <body> <div class="main_wrap"> <header> Header </header> <div class="wrapper"> <div class="flex_wrap"> <div class="flex_column"> Left Column <br> Left Column <br> Left Column <br> Left Column </div> </div> <div class="flex_wrap"> <div class="flex_column"> Right Column 1 </div> <div class="flex_column"> Right Column 2 </div> </div> </div> <footer> Footer1 </footer> <footer> Footer2 </footer> <footer> Footer3 </footer> </div> </body> </html>