bootstrap center 3 col-md-3 divs

后端 未结 5 1179
既然无缘
既然无缘 2021-02-19 21:27

I have a wrapper like so:

and inside this wrapper I have 3 col-md-3 divs:

5条回答
  •  你的背包
    2021-02-19 22:27

    Update: This is good solution for normal layout, not for Twitter Bootstrap as it disrupts the Bootstrap behaviour. Check Jeben's answer for a better layout.

    A modern browsers solution and apt for your problem. Flexbox technique with justified content.

    @media (min-width:992px) {
      .community-images {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
      }
    }
    

    Bootply

提交回复
热议问题