css - Image in modal window - how to set modal width to auto? -


i have modal window image, works fine, images blank space on right side of image.

example: http://www.bootply.com/yjifnrdcf1

<a data-toggle="modal" data-target="#full-flyer-120" href="#">click me</a>    <div class="modal fade" id="full-flyer-120" tabindex="-1" role="dialog" aria-labelledby="full-flyer-120label" style="display: none;">     <div class="modal-dialog" role="document">       <div class="modal-content">         <div class="modal-body">           <img class="img-responsive" src="http://portalwiedzy.onet.pl/_i/mendelejew.jpg" alt="full mendelejew">         </div>       </div>     </div>   </div> 

how can change modal window same size image?

just add following stylesheet.

.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-responsive, .thumbnail a>img, .thumbnail>img {      display: block;      width: 100%;      height: auto;  }
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>  <a data-toggle="modal" data-target="#full-flyer-120" href="#">click me</a>          <div class="modal fade" id="full-flyer-120" tabindex="-1" role="dialog" aria-labelledby="full-flyer-120label" style="display: none;">          <div class="modal-dialog" role="document">            <div class="modal-content">              <div class="modal-body">                <img class="img-responsive" src="http://portalwiedzy.onet.pl/_i/mendelejew.jpg" alt="full mendelejew">              </div>            </div>          </div>        </div>

basically, need change image style little.

hope helps


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -