Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Padding Bootstrap Thumbnails

I am using thumbnails in bootstrap. I have been able to correct the padding to my liking on the sides, but not below it. This is a big problem on mobile as it's way too wide for my liking.

Code:

<div class="col-5-gutter">
<div class="col-md-4">
<div class="thumbnail"><img src="images/Thumbnail_Placeholder.png" alt="Thumbnail Image 1">
<div class="caption">
<h3>Text</h3>
<p>Text.</p>      
</div>
</div>
</div>
<div class="col-5-gutter">
<div class="col-md-4">
<div class="thumbnail"><img src="images/Thumbnail_Placeholder.png" alt="Thumbnail Image 1">
<div class="caption">
<h3>Text Here</h3>
<p>Text Here</p>
</div>
</div>
</div>
</div>

CSS:

.col-5-gutter > [class*='col-'] {
    padding-right:5px;
    padding-left:5px;
    padding-bottom: 5px;
}
like image 783
Phil Avatar asked Nov 19 '25 10:11

Phil


1 Answers

The answer was marginsnotpadding. However the problem was in the thumbnail class:

.thumbnail {
margin-bottom: 5px;

}

like image 175
Phil Avatar answered Nov 20 '25 23:11

Phil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!