<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex</title>
<style>
div {
border:1px #999999 solid;
}
#container {
width:100%;
height:90vh;
display:flex;
}
#menu {
flex-grow: 1;
}
#main {
flex: auto;
flex-grow: 3;
}
#more {
flex: auto;
flex-grow: 1;
}
</style>
<script>
function $(el) { return document.getElementById(el); }
// 0 hide 1 show
function show(divid, sw) { $(divid).style.display = (sw == 0 ? "none" : "block"); }
</script>
</head>
<body>
<input alt="menu" type="button" value="one off" onclick="show(this.alt,0)">
<input alt="menu" type="button" value="one on" onclick="show(this.alt,1)">
<input alt="main" type="button" value="main off" onclick="show(this.alt,0)">
<input alt="main" type="button" value="main on" onclick="show(this.alt,1)">
<input alt="more" type="button" value="more off" onclick="show(this.alt,0)">
<input alt="more" type="button" value="more on" onclick="show(this.alt,1)">
<div id="container">
<div id="menu">Left</div>
<div id="main">main</div>
<div id="more">Right</div>
</div>
</body>
</html>