Differences between container, row and span in Bootstrap

后端 未结 3 1805
醉酒成梦
醉酒成梦 2020-12-13 06:18

While using Twitter Bootstrap, should I nest a row div within a container div and put all my span divs within the nested row? Is that the best practice?

What if I pu

3条回答
  •  遥遥无期
    2020-12-13 06:50

    You should have row inside a container, since using the container will ensure that the container is evenly centered across the entire page with even margins since container has margin-left:auto;margin-right:auto; in the CSS.

    Use row when you want spanX's to appear on the same line.

    spanX's that are not inside row will wrap.

    Here's a demo that will show you the differences

提交回复
热议问题