I'm struggling with how to reorganize my panels on mobile devices. Each panel has a different size. Please refer to the attached screenshot for the page layout on large screens (col-lg):
https://i.sstatic.net/xcqaT.png
EDIT: The layout on large screens looks fine, as I prefer not to have any gaps between rows due to varying panel heights.
However, when viewing on a mobile device (col-xs), the order is currently:
1st panel4th panel
7th panel
2nd panel
5th panel
3rd panel
6th panel
Please see the image below of the current mobile screen layout:
https://i.sstatic.net/iJph8.png
I would like to rearrange the panel locations on mobile (col-xs) to follow this sequence:
1st panel
2nd panel
3rd panel
4th panel
7th panel
5th panel
6th panel
Below is a snippet of the code that I am using:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ=="
crossorigin="anonymous">
</head>
<body>
<div class="container">
<!-- 1st panel -->
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">1st</h3>
</div>
<div class="panel-body">
1st panel<br>
1st panel<br>
1st panel
</div>
</div>
<!-- 4th panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">4th</h3>
</div>
<div class="panel-body">
4th panel<br>
4th panel<br>
4th panel<br>
4th panel<br>
</div>
</div>
<!-- 7th panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">7th</h3>
</div>
<div class="panel-body">
7th panel<br>
7th panel<br>
7th panel<br>
7th panel<br>
</div>
</div>
</div>
<!-- 2nd panel -->
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">2nd</h3>
</div>
<div class="panel-body">
2nd panel<br>
2nd panel<br>
2nd panel<br>
2nd panel<br>
2nd panel<br>
2nd panel
</div>
</div>
<!-- 5th panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">5th</h3>
</div>
<div class="panel-body">
5th panel<br>
5th panel<br>
5th panel<br>
5th panel<br>
</div>
</div>
</div>
<!-- 3rd panel -->
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">3rd</h3>
</div>
<div class="panel-body">
3rd panel<br>
3rd panel<br>
3rd panel
</div>
</div>
<!-- 6th panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">6th</h3>
</div>
<div class="panel-body">
6th panel<br>
6th panel<br>
6th panel<br>
6th panel<br>
</div>
</div>
</div>
</div>
</body>
</html>