0

I have a simple absolute div and an image inside it.

I don't know why there is this strange small gap/empty space underneath the image. I used other images in the same div and it seems to be the same!

This is what I have:

.adHolder {
  width:100%;
  /*height: auto;*/
  position:absolute;
  bottom:0;
  left:0;
  /*border-top:solid 1px #fff;*/
  padding:0;
  margin:0;
  z-index:1;
}

.adHolder img {
  width:100%;
  height:100% !important;
  padding:0 !important;
  margin:0 !important;
  border:none;
}
<div class="adHolder">
  <img src="http://t.wallpaperweb.org/wallpaper/nature/3840x1024/9XMedia1280TripleHorizontalMountainsclouds.jpg">
</div>

if you look at the bottom of the image, there is a small line (empty space) which I need to get rid of.

Any pointers would be appreciated.

Minal Chauhan
  • 5,982
  • 8
  • 20
  • 39
Rooz Far
  • 187
  • 1
  • 2
  • 10

1 Answers1

1

add display:block to image

.adHolder {
  width:100%;
  /*height: auto;*/
  position:absolute;
  bottom:0;
  left:0;
  /*border-top:solid 1px #fff;*/
  padding:0;
  margin:0;
  z-index:1;
}

.adHolder img {
  width:100%;
  height:100% !important;
  padding:0 !important;
  margin:0 !important;
  border:none;
  display: block;
}
<div class="adHolder"><img src="http://via.placeholder.com/350x150"></div>
Minal Chauhan
  • 5,982
  • 8
  • 20
  • 39
patelarpan
  • 5,988
  • 2
  • 18
  • 23