I want to align elements on the grid, but it stays on top of each other when I place it.
I tried to use float: left
, at first it works, but when the screen gets small everything gets messed up, the images are out of div
.
Here is the sample code:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- - - - - - - - - - - - - - - -->
<div class="col-sm-3 col-sm-offset-1" style="border:1px solid red;">
<p style="text-align:center;"><b>Imagens</b></p>
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left " width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
</div>
<div class="col-sm-3 col-sm-offset-1" style="border:1px solid red;">
<p style="text-align:center;"><b>Imagens</b></p>
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left " width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
<img src="http://lorempixel.com/50/50/"class="img-responsive pull-left" width="50px">
</div>