Can someone help me with aligning different images of varying widths but the same height inline with text next to each image? I tried to do it, but it doesn't look good on responsive screens. Any suggestions on how to fix this? And if there's a better way to write this code, please share. Here is my current code:
.img{
min-width: 30%;
float: left;
}
.text{
font-size: 20px;
width: 70%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<div class="row text-center">
<div class="col-lg-3 col-lg-offset-1 col-xs-4">
<div class="img">
<img src="http://placehold.it/350x150" />
</div>
<div class="text">
<p>Test</p>
</div>
</div>
<div class="col-lg-3 col-lg-offset-1 col-xs-4">
<div class="img">
<img src="http://placehold.it/250x150" />
</div>
<div class="text">
<p>Test</p>
</div>
</div>
<div class="col-lg-3 col-lg-offset-1 col-xs-4">
<div class="img">
<img src="http://placehold.it/300x150" />
</div>
<div class="text">
<p>Test</p>
</div>
</div>
</div>