Reorder Columns in Mobile Screen using Bootstrap

Last Reply on Sep 01, 2015 04:44 AM By aditya2267

Posted on Aug 24, 2015 02:51 AM


There are 5 equal clolumns in bootstrap.

<div class="row">
<div class="col-md-2"> box 1 </div>
<div class="col-md-3">box 2</div>
<div class="col-md-2">box 3 </div>
<div class="col-md-2">box 4</div>
<div class="col-md-3">box 5</div>

I want to reorder these columns in small screen (mobile devices) like below picture.

regards firoz

Posted on Sep 01, 2015 04:44 AM

Please Refer below code.

<!DOCTYPE html>
<html lang="en">
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <style type="text/css">
       .box { background-color:#38B3DF; text-align:center; color:#fff; margin-bottom:10px; }
<div class="row">
<div class="col-md-2 col-xs-6"><div class="box"> box 1 </div></div>
<div class="col-md-3 col-xs-6"><div class="box"> box 2 </div></div>
<div class="col-md-2 col-xs-6"><div class="box"> box 3 </div></div>
<div class="col-md-2 col-xs-6"><div class="box"> box 4 </div></div>
<div class="col-md-3 col-xs-12"><div class="box"> box 5 </div></div>



I agree, here is the link: