html - set max-height of flexbox sidebar to never exceed the other box -


i've flex layout 2 columns: 1 sidebar, 1 content.

i need way make sidebar height never higher height of box-content.

my css is:

.layout {   display: flex; } .sidebar { } .content {   flex: 1; } 

http://codepen.io/fezvrasta/pen/wvwzxo

how can do?

found solution:

http://dcousineau.com/blog/2011/07/14/flex-box-prevent-children-from-stretching/

you have put div inside sidebar , set height 0, make trick.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -