I am using Twitter Bootstrap and creating a row with 3 images, I would like all three images in the row to become equal size, however the third image is larger than the other and it being a little large in size despite all of the columns becoming the same size.
<div class="row">
<div class="col-6">
<div class="card card-size h-100" style="background-color: transparent; border: 0;">
<img src="utilities/java-icon.svg" class="card-img-top">
<div class="card-body text-center">
<p class="card-text"> <b> Python </b></p>
</div>
</div>
</div>
<div class="col-6">
<div class="card card-size h-100" style="background-color: transparent; border: 0;">
<img src="utilities/c-logo.svg" class="card-img-top">
<div class="card-body text-center">
<p class="card-text"> <b> Python </b></p>
</div>
</div>
</div>
</div>
The code is above.
How can I secure that all of the images in the row are of equal size?
I go not mind if all images are the same size as the smallest image or the largest, I would like dynamic behaviour this means I do not want to hard card a height etc…
2
Answers
In your image tag add this class to make your image responsive and equal to the columns width
If you are using Bootstrap 3 then
img-responsive
:If You are using Bootstrap 4 then
img-fluid
:this will work:
check fiddle:https://jsfiddle.net/13jqeywb/2/