I am trying to take
<div></div>
<div></div>
<div></div>
Three sequential divs and turn it into below. Where red is div 1, green is div 2, blue is div 3.
I can do this with floats, something like
.div1 { float: left; }
.div2 { float: left; }
.div3 { float: left; }
But I can't seem to get it working in flexbox, is this possible?
After thinking about this a little more, it is possible with flexbox. The container just has to have a defined height (
%
,px
orvh
) will work.http://www.codeply.com/go/U1DCKAx85d
http://www.codeply.com/go/U1DCKAx85d
The Hackish Method (just for fun):
*Not Recommended (I'm sure you'll notice why)
The Legit Method:
*Recommended