Created
March 23, 2015 16:32
-
-
Save randompast/e3d2fc4319a35858918f to your computer and use it in GitHub Desktop.
resize with flexbox - much easier than people seem to think!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Resize Demo</title> | |
<style media="screen"> | |
body { | |
margin:0; | |
padding:0; | |
} | |
.container { | |
display: flex; | |
height: 100%; | |
} | |
.infoBar { | |
/*flex: 1; prevents resize!*/ | |
min-width:200px; | |
background-color: #cfc; | |
border-style: solid; | |
border-width: 1px; | |
resize: horizontal; | |
overflow: auto; | |
} | |
#canvas { | |
min-width:200px; | |
flex:3; | |
background-color: #cfe; | |
border-style: solid; | |
border-width: 1px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="infoBar"> | |
<ul> | |
<li>Thing1</li> | |
<li>Thing2</li> | |
<li>Thing3</li> | |
</ul> | |
</div> | |
<canvas id="canvas"></canvas> | |
</div> | |
</body> | |
</html> |
Nice.
Sadly IE11 does not support it, and I have to support IE11.
Thanks a lot! That helped.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/g1hw2eyc/