HTML CSS examples for CSS Layout:2 Column
Two fluid columns on the sides and width:auto for the middle column
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #wrapper{<!-- w w w .j av a2 s . c o m--> display:-webkit-box; display:-moz-box; display:-ms-flexbox; display:-webkit-flex; display:flex; width:100%; height:100%; } #wrapper > div{ height:100%; } #left { background-color:pink; text-align:right; flex: 1 0 auto; } #center { background-color:green; flex: 0 1 auto; } #right { background-color:red; flex: 1 0 auto; } body, html{ width:100%; height:100%; } </style> </head> <body> <div id="wrapper"> <div id="left"> this is a test test </div> <div id="center"> Center content </div> <div id="right"> this is a test test </div> </div> </body> </html>