Bootstrap 4, how to make a col have a height of 100%?

后端 未结 7 727
难免孤独
难免孤独 2020-12-13 04:00

how can I make a column take up 100% height of the browser w bootstrap 4?

See the following: https://codepen.io/johnpickly/pen/dRqxjV

Note the yellow div, I

7条回答
  •  一向
    一向 (楼主)
    2020-12-13 04:43

    I came across this problem because my cols exceeded the row grid length (> 12)

    A solution using 100% Bootstrap 4:

    Since the rows in Bootstrap are already display: flex

    You just need to add flex-fill to the Col, and h-100 to the container and any children.

    Pen here: https://codepen.io/joshkopecek/pen/Exjdgjo

    XXXX
    Form Goes Here
    Another form

提交回复
热议问题