Bootstrap 4 Center Vertical and Horizontal Alignment

前端 未结 11 2856
借酒劲吻你
借酒劲吻你 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:14

    Use This Code In CSS :

    .container {
        width: 600px;
        height: 350px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: inline-flex;
    }
    

提交回复
热议问题