Bootstrap row class contains margin-left and margin-right which creates problems

前端 未结 8 2019
北恋
北恋 2020-12-02 15:20

I am using Bootstrap \'row\' class to align divs one on top of another, which works fine but

.row {
   margin-left: -15px;
   marg         


        
8条回答
  •  遥遥无期
    2020-12-02 15:59

    The .row is meant to be used inside a container. Since the container has padding to adjust the negative margin in the .row, grid columns used inside the .row can then adjust to the full width of the container. See the Bootstrap docs: http://getbootstrap.com/css/#grid

    Here's an example to illustrate: http://bootply.com/131054

    So, a better solution may for you to place your .row inside a .container or .container-fluid

提交回复
热议问题