Flexbox column align self to bottom

后端 未结 7 1420
逝去的感伤
逝去的感伤 2021-01-30 19:53

Im trying to use Flexbox. http://css-tricks.com/almanac/properties/a/align-content/ this shows nice alignment options; but i would actually want a Top-top-bottom situation.

7条回答
  •  孤独总比滥情好
    2021-01-30 20:21

    I found my own solution, i will add it here for documentation value;

    If you give the middle block height: 100% it will take up al the room in the middle. So the bottom block will be at the actual bottom and top and middle are on top.

    UPDATE: This doesn't work for Chrome...

    UPDATE: Found a way that works for FF/Chrome: setting flex-grow on a higher number (1 is enough) for [middle] will make it take full middle size. more info: http://css-tricks.com/almanac/properties/f/flex-grow/

提交回复
热议问题