Bootstrap 3 Nesting Issue

五迷三道 提交于 2019-12-11 02:54:42

问题


I have been working on this for about 2 hours, and nesting in Bootstrap 3 refueses to work. I have even copy pasta'd Bootstrap 3's doc examples and they still look weird.

My issue is that there are always margins/paddings when I do nested grids. Check this out:

http://jliu.me/grill/admin.html

(It's how the two things on the bottom (both col-lg-6) are not aligned with top).

Could somebody help me on this?


回答1:


.col-lg-5 { padding-right: 0; }
.col-lg-5.col-offset-1 { padding-left: 0; }

I will suggest to add an unique class to each and remove the padding-left form the offset one and the padding-right for the other one

Hope this helps.




回答2:


Can you please clarify what you mean by 'not aligned with the top'? I presume you are referring to the padding on the left and right sides of the charts?

You do not need to nest these items within the order status row, but rather I would suggest using

row
  col-lg-10 col-offset-1
    [first row here]
  /div
/div
row
  col-lg-5 col-offset-1
    [second row first chart here]
  /div
  col-lg-5
    [second row first chart here]
  /div
/div

using this approach, the outer sides of your charts should align with the outer sides of the 'order status' row.

hope this helps!



来源:https://stackoverflow.com/questions/18027928/bootstrap-3-nesting-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!