1

This is my code structure...

<div class="container">
  <div class="img-container" style="display:inline-block;">
    <img src="image/exaple.png" style="width:100%" />
  </div>
</div>

I need to increase the width of the image to 100%. but the img-container div not expanding to 100%. how can i resolve this?

  • 1
    With the code that I see there, the image will span the width of the `img-container` div. Try making the width of the `img-container` div to 100% – Jacques Koekemoer Mar 18 '16 at 09:08
  • Thank u :) .. am in the situation that am unable touch the img-container to change anything. and it should be inline block.. – Hariharasuthan T G Mar 18 '16 at 09:16
  • Well you could use `@media` queries to change the width of the image to `px`. See the example here http://stackoverflow.com/questions/18424798/twitter-bootstrap-3-how-to-use-media-queries. This works best with bootstrap. If you don't want to use bootstrap then remember to add the `view port` tag to your `head` tag. – Jacques Koekemoer Mar 18 '16 at 09:43

0 Answers0