David Smith

David Smith

  • NA
  • 2k
  • 0

HTML IMG

Jul 10 2013 4:14 AM
How to make a img fit or stretch into a div. Base upon my  css code below, the smaller the height, the image is being cut off

Below is my html code.

<div class="carouselMainStoryContentHeader">
        <a class="carouselMainImage">
                 <img src="images/1.jpg" alt="" />
        </a>
 </div>


CSS code:

.carouselMainImage
  height: 250px;
}


Answers (8)