html - Two full height columns, one divided in two stacks with same height -


there 1 column on left-hand side , 1 on right-hand side. these columns have same height, created flexbox:

html

<div class="flex-container">     <div class="left flex-item">grounds rich pumpkin spice milk aftertaste doppio cream carajillo. espresso body iced rich caramelization brewed sit organic crema. qui grounds doppio wings ristretto barista cream brewed coffee aftertaste ristretto that. froth americano, french press , dark java brewed.grounds rich pumpkin spice milk aftertaste doppio cream carajillo. espresso body iced rich caramelization brewed sit organic crema. qui grounds doppio wings ristretto barista cream brewed coffee aftertaste ristretto that. froth americano, french press , dark java brewed.</div>     <div class="right flex-item">         <div class="stack stack-top">stack</div>         <div class="stack stack-below">stack</div>     </div> </div> 

css

.flex-container {     display: flex; }  .flex-item {     flex: 1 0; }  .left, .right, .stack {     border: 1px solid silver; } 

the column on right-hand side should divided vertically 2 stacks same height (50%). should dynamically height of column on left-hand side.

is there way flexbox , without using height property? (no need work in browsers)

jsfiddle

yes, can make second flex item flexbox itself, , change direction column, apply flex: 1 child items.

html (no changes)

css

.flex-container {     display: flex; }  .flex-item {     flex: 1 0; }  .left, .right, .stack {     border: 1px solid silver; }  .flex-container > div:nth-child(2) {     display: flex;     flex-direction: column; }  .flex-container > div:nth-child(2) > div {     flex: 1; } 

demo: http://jsfiddle.net/ha0aqysk/


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -