Floated elements of variable height push siblings down

后端 未结 3 841
既然无缘
既然无缘 2020-11-22 06:15

I have 6 elements which should result in two rows of 3 elements each, so I\'ve floated them. But the content of the elements varies quite a bit, and the layout breaks when

3条回答
  •  攒了一身酷
    2020-11-22 06:52

    Here is a solution I tested: http://jsfiddle.net/5Upbt/7/

    I modify your figure style

    figure { display: inline-block; vertical-align: top; width: 30%; margin-left: 1%; font-size: small; outline: solid #999 1px; }
    

    This is based on the more general solution here: http://jsfiddle.net/bazmegakapa/Ft9d2/

提交回复
热议问题