Bootstrap 4 Center Vertical and Horizontal Alignment

前端 未结 11 2859
借酒劲吻你
借酒劲吻你 2020-11-21 04:37

I have a page where only form exists and I want form to be placed in the center of the screen.

11条回答
  •  被撕碎了的回忆
    2020-11-21 05:18

    None has worked for me. But his one did.

    Since the Bootstrap 4 .row class is now display:flex you can simply use the new align-self-center flexbox utility on any column to vertically center it:

    Center
    Taller

    I learned about it from https://medium.com/wdstack/bootstrap-4-vertical-center-1211448a2eff

提交回复
热议问题