Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting rid of Twitter Bootstrap thumbnail border

I'm trying to get rid of the default thumbnail thin grey border in Twitter Bootstrap.

I can target the borders, for example if I use:

.thumbnails > li { border:1px solid red; }

all the thumbnail borders change to red.

But if I use:

.thumbnails > li { border:0; }

it still leaves the borders with a thin grey line. I cannot get rid of that. I've tried to change the color to white (my background is white, so it could be a solution) but it doesn't work.

How can I get rid of that thin grey border?

like image 826
Jorge Avatar asked May 03 '13 06:05

Jorge


People also ask

How do I remove a border in bootstrap?

The border-left-0 class is used to remove the left border in Bootstrap 4.

How do I remove the radius from a bootstrap button?

Just go to http://getbootstrap.com/customize/ Find all "radius" and modify them as you wish. Click "Compile and Download" and enjoy your own version of Bootstrap.


2 Answers

Thumbnail borders are applied to the .thumbnail element, inside the <li>. Anyway, the "extra" thin line you talk about could be the box-shadow applied to that class.

So you can try:

.thumbnail {
    border: 0 none;
    box-shadow: none;
}
like image 102
albertedevigo Avatar answered Oct 14 '22 20:10

albertedevigo


If the method advised by @albertedevigo doesn't work then try changing the class from 'img-thumbnail' to 'img-responsive'.

The .img-responsive class applies display: block; and max-width: 100%; and height: auto; to the image.

HTML

    <div class="row no-pad">
          <div class="col-md-2"><img src="E:\VIPUL\Adobe Lightroom\Modified\Awesome.jpg" 
class="img-responsive"  alt="Awesome.jpg">
        </div>
       </div>

CSS

     .row.no-pad.img-responsive{
      margin-right:0px;
      margin-left:0px;
      border:none;
    }

Cheers!

like image 27
Vipul Sharma Avatar answered Oct 14 '22 21:10

Vipul Sharma