Bootstrap Responsive Columns

 
  • .xs class used for mobiles.
  • .sm class used for tablets.
  • .md class used for dekstops.
  • .lg class used for large screens.
  • these four classe are so helpfull in creating more dynamic layouts.
  • Note => A single row can't ne divided more than twelve grid columns.
 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bootstrap Grid Example</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container-fluid"> <h1>Classes for responsive design</h1> <div class="row"> <div class="col-xs-9 col-md-7" style="background-color:red;">.col-xs-9 .col-md-7</div> <div class="col-xs-3 col-md-5" style="background-color:yellow;">.col-xs-3 .col-md-5</div> </div> <div class="row" style="background-color:lightcyan;"> <div class="col-xs-6">.col-xs-6</div> <div class="col-xs-6">.col-xs-6</div> </div> </div> </body> </html>
Output