0

i have one image in a page which is inside of a thumbnail(using bootstrap 3) i want to center this image, but it goes to the left of the page. how can i center this thumbnail?

here's the code:

<div class="container"> 
    <div class="row-fluid">
        <div class="col-sm-12">
            <div class="img-thumbnail">
                <img class="img-responsive center-block" src="images/winning logo.png" 
                      alt="...">
                     <div class="container">
                            <div class="caption">
                                <h5><a href="Portlogo.html">Logo Design</a></h5>        
                            </div>

                     </div>


             </div> 
         </div>
    </div>                                        
 </div>

to brian: it didn't work with my thumbnail inside a carousel. the width of the thumbnail extend(right and left) inside the carousel.

<div class="carousel-inner">

    <div class="item active">
        <div class="row text-center">
            <div class="col-sm-12">
                <a href="" class="thumbnail">
                    <img class="img-responsive center-block" src="images/winning 
                         logo.png" alt="Slide">
                            <div class="carousel-caption">
                                <h4>CANYONLAND RENTALS</h4>
                                    <p>Lorem ipsum dolor sit amet, consectetuer 
                                          adipiscing elit. </p>
                            </div>
                </a>
            </div><!--END OF COL-SM-12-->
        </div><!--END OF ROW-->             
    </div>
</div>
egtdesign
  • 21
  • 6
  • apply `.text-center` to `.img_thumbnail` – Brian Dillingham Sep 27 '14 at 01:38
  • possible duplicate of [How to align an image dead center with bootstrap](http://stackoverflow.com/questions/10879955/how-to-align-an-image-dead-center-with-bootstrap) – Brian Dillingham Sep 27 '14 at 01:39
  • thanks brian for the suggestions and the link. i added in
    and it worked. this already resolved. thanks again. i just want to know if this is also applicable in the image inside thumbnail of a carousel?
    – egtdesign Sep 27 '14 at 04:57
  • its applicable to any bounding box thats width is larger than the image. – Brian Dillingham Sep 27 '14 at 13:18
  • brian, it didn't work with my thumbnail inside a carousel. the width of the thumbnail extend(right and left) inside the carousel. – egtdesign Sep 28 '14 at 00:07

1 Answers1

1

it resolved, need to change the word "thumbnail" to "img-thumbnail".

egtdesign
  • 21
  • 6