Bootstrap columns not aligning correctly

前端 未结 4 1463
小鲜肉
小鲜肉 2020-12-10 03:38

I\'ve built a layout using Bootstrap 3, and I have the following problem: I have a news section that is set to display a total of 9 news items, 3 on each row, summing 3 rows

4条回答
  •  孤城傲影
    2020-12-10 04:29

    You're so close. The column classes have the float attribute set in the bootstrap styles and your column is floating, just not where you expect it. That middle column in the 1st row is preventing the one you see floating off in the blank space from wrapping properly because it's taller than the others. All you need to do is wrap each group of 3 in a row like this:

    //stuff here
    //stuff here
    //stuff here
    //stuff here
    //stuff here
    //stuff here
    //stuff here
    //stuff here
    //stuff here

    Set it up like that and you're ready to go.

提交回复
热议问题