0

enter image description here

How to fix it?
Please look at this picture and tell me what's wrong.

PS: All the image is 400*250, but the green one is 399*250.I think "img-responsive" class will fix it,but it doesn't work.

  
<body>
<div class="container">
  <div class="row">
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img  class="img-responsive" src="img\1.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\2.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\3.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\4.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\5.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\6.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\7.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\8.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="img\9.jpg" alt="">
      </a>
    </div>
  </div>
</div>
</body>
</html>
Mr Lister
  • 42,557
  • 14
  • 95
  • 136
erdn blg
  • 19
  • 3
  • Looks like every image is of `class="img-responsive"` except one, I wonder why that is. – Havenard Sep 29 '16 at 05:27
  • I added class="img-responsive" just now, still don't work. – erdn blg Sep 29 '16 at 05:32
  • You are simply not providing enough information to debug the problem. Try to reproduce it on http://jsfiddle.net and give us the live example. – Havenard Sep 29 '16 at 05:32
  • You should also not use that bar leaned to left when giving the images URLs, in URLs the bars are leaned to the right `/` – Havenard Sep 29 '16 at 05:34
  • Please provide absolute path of images for debugging – Santosh Khalse Sep 29 '16 at 05:38
  • @erdn blg, could you get all images same height? – Igor Ivancha Sep 29 '16 at 06:15
  • You need responsive resets. Already been answered several times: http://stackoverflow.com/questions/22310912/twitter-bootstrap-rows-and-columns-of-different-height/22311212 or http://stackoverflow.com/questions/38730889/bootstrap-grid-system-new-line-does-not-look-nice/38745719 – Zim Sep 29 '16 at 09:32

1 Answers1

0

try this, may be this will help you, here i have taken guitar image (400*250) and aeroplane image(399*250) as you mentioned

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
@media only screen and (min-width : 980px) {
    .img-responsive {
       height:250px !important;
    }
}
</style>
</head>
<body>

<div class="container">
  <div class="row">
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img  class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive"  src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://www.pilotstoresusa.com/resize/Shared/images/jcwings/JC4QBA020.jpg?lr=t&bh=250" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
    <div class="col-md-4">
      <a href="" class="thumbnail">
        <img class="img-responsive" src="http://2.bp.blogspot.com/-MWgiQDpUc-U/ULjocrm-69I/AAAAAAAAA5g/SOEefmhNo1A/s400/nice+guitar.jpg" alt="">
      </a>
    </div>
  </div>
</div>
</body>
</html>
Ganesh Putta
  • 2,792
  • 13
  • 23