Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing that annoying white background from thumbnails in Bootstrap 3

I have created small piece of code where it shows 4 thumbnails in a row of equal grid width.

.row-content-3 {
    background-color: rgba(0,0,0,0.8) !important;
    color: #fff;
    margin:0px auto;
    padding: 50px 0px 50px 0px;
    min-height:200px;
}
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row row-content-3">
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <div class="thumbnail">
               <a href="#">
                 <img src="http://www.theo-android.co.uk/github-images/fair1.png" class="img-circle" alt="Larissa's fair"> 
               </a>
            </div>
        </div>
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <div class="thumbnail">
               <a href="#">
                 <img src="http://www.theo-android.co.uk/github-images/fair2.png" class="img-circle" alt="Larissa's fair"> 
               </a>
            </div>
        </div>
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <div class="thumbnail">
               <a href="#">
                 <img src="http://www.theo-android.co.uk/github-images/fair3.png" class="img-circle" alt="Larissa's fair"> 
               </a>
            </div>
        </div>
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <div class="thumbnail">
               <a href="#">
                 <img src="http://www.theo-android.co.uk/github-images/fair4.png" class="img-circle" alt="Larissa's fair"> 
               </a>
            </div>
        </div>   
 </div>

If you run the code,you will notice that there is a white background which needs to be removed. I put this css simple code,but it didn't work:(.

.thumbnail {
  border: 0;
}

Also I am giving you the jsfiddle.

Any ideas,

Thanks Theo.

like image 861
Theo Avatar asked Feb 14 '17 06:02

Theo


People also ask

What is Bootstrap 3 thumbnails?

Bootstrap 3 provides classes that are specifically used to style thumbnail images. Used in conjunction with the grid system, thumbnails can present images, videos, text, etc in grids.

How to remove border around thumbnails in Bootstrap?

Go into your bootstrap.min.css (if you have it local, otherwise you have to download it) and search for: ".thumbnail" and then delete the part where it says "border" or so.. Don't have any bootstrap version aviable otherwise I will say you where that is, sry.

How to remove the white background from an image?

Easily remove the white background of your photos in seconds with our free online tool. Download your new image or open it in Creative Cloud Express to turn it into a stunning graphic. How to remove the white background from an image. 1. Select. For best results, choose an image where the subject has clear edges with nothing overlapping. 2. Remove.

How to create a full page background image using mdbootstrap?

Click on the images to launch the live demo. Fortunately, there is a class in MDBootstrap that fixes this issue. Just add .bg-image to the class and you will see the problem magically disappear. Now we can easily make this background image to cover the full available space and make it a full-page background image.


1 Answers

If i am not wrong then you wanted to remove the white background from the circle image back only.

I Added this

.thumbnail {
  border: 0;
  background: transparent;
}

And you can see there is box shadow too. You can remove that by using

box-shadow: none;

Updated fiddle: https://jsfiddle.net/udgw71no/6/

like image 117
Bhawna Avatar answered Oct 13 '22 02:10

Bhawna