html - Does a row within a container require span12? Bootstrap -
i using bootstrap first time work on project of mine. , can tell container>row works fine, begs questions container>row>span12 needed, or best practice?
thank you
the question confusing.
bootstrap works using floated grid system. looking @ source below should clear going on. .container class sets width of 940px, .span12 class. .row class div clearfix on contain row of floated .span columns. .spanxx classes floated left , given 20px left margin create grid.
if using container , row, creating 940px wide container -20px left-margin. should still use .span12 keep consistent framework , set margin correctly. raises question, why using grid layout in first place if don't want take advantage of columns. if want 940px container create one.
from bootstrap.css:
.row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; line-height: 0; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; margin-left: 20px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .span12 { width: 940px; }
Comments
Post a Comment