Horizontally & Vertically centering 2 divs within two side by side 50% width columns

青春壹個敷衍的年華 提交于 2019-12-01 14:24:06

I tried this. I'm not sure if this is what you are looking for. I added display: flex; to the .left and .right classes.

.parent {
    height: 100%;
    width: 100%;
}

.left, .right {
    float: left;
    height: 500px;
    width: 50%;
    display: flex;
}

.info {
    width: 400px;
    height: 280px;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!