html - Is it acceptable to omit container elements when using Bootstrap's grid? -
i have used bootstrap framework create responsive site, have not used bootstrap .container class.
for project, content sits withing div class of .wrapper. wrapper fluid , has width of 80%, max 1200px , min width 360px. within wrapper have used standard .row , .col boostrap classes.
i have tested site , works expected. site validates , (even works on ie-9) , mobile devices.
is ok use above method without .container class?
many thanks, p
there's no reason must use container elements. however, .container-fluid
class describe. i'd consider switching custom wrapper standardization , ease of maintenance.
regarding row margins--that's not great idea. may find wanting modern "flat" design you'll want of rows stacked tightly. it's better leave grid elements alone, , apply margins , padding inner elements. put class on row so:
.row.padded > div div { /* > div should column */ margin: 1em 0; } <div class="container-fluid"> <div class="row padded"> <div class="col-xs-12"> <div> ... </div> <!-- have margin -->
Comments
Post a Comment