Skip to content

Instantly share code, notes, and snippets.

@albertoperdomo
Created August 19, 2011 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertoperdomo/1157466 to your computer and use it in GitHub Desktop.
Save albertoperdomo/1157466 to your computer and use it in GitHub Desktop.
Flexible layout using boxes
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {width: 100%; height: 100%; margin: 0px; padding: 0px;}
#layout { background: yellow; display: -webkit-box; -webkit-box-orient: vertical; }
#main-container { background: red; display: -webkit-box; -webkit-box-flex: 1; }
#sidebar { background: green; -webkit-box-flex: 0; }
#map-canvas { background: black; -webkit-box-flex: 1; }
#footer { background: yellow; -webkit-box-flex: 0; height: 50px; }
</style>
</head>
<body>
<div id="layout">
<div id="main-container">
<div id="sidebar">
Sidebar
</div>
<div id="map-canvas"></div>
</div>
<div id="footer">
Footer
</div>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment