html - Bootstrap - Columns default value -



html - Bootstrap - Columns default value -

on bootstrap grid system documentation says:

content should placed within columns, , columns may immediate children of rows.

so on next illustration smartphones , tablets:

<div class="row"> <div class="col-xs-12 col-sm-12">column one</div> <div class="col-xs-12 col-sm-12">column two</div> </div>

do have set classes col-xs-12 col-sm-12 when column should fill row width or there default class can set both devices? if don't set col classes, content pushed left , right due negative margins on .row class.

as bootstrap mobile first, if set .col-xs-12, div have total on every device. means don't have set .col-sm-12.

<div class="row"> <div class="col-xs-12"> <!-- 12-col on xs/sm/md/lg --> </div> <div class="col-xs-12 col-6-md"> <!-- 12-col on xs/sm 6-col on ms/lg --> </div> <div class="col-xs-12 col-6-md col-12-lg"> <!-- 12-col on xs/sm 6-col on md 12-col on lg --> </div> </div>

plus, default value is precisely .col-xs-12. means don't have specify it:

<div class="row"> <div class="col-md-6"> <!-- 12-col on xs/sm 6-col on md --> </div> </div>

html css twitter-bootstrap

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -