I'm adding a box shadow to an element containing an img and it's creating an arbitrary white border on the bottom of the element. No border is being applied via CSS (and I even tried overriding with border:none;
without luck). When applied to the image directly, it appears properly. But when applied to a div containing an image, the border appears.
Any help is grealty appreciated.
<style>
html,body,div,img {margin:0; padding:0;}
body {padding:50px;}
.badge_image {
float:left;
/* css drop shadow */
-webkit-box-shadow: 1px 1px 5px 0px #a2958a;
-moz-box-shadow: 1px 1px 5px 0px #a2958a;
box-shadow: 1px 1px 5px 0px #a2958a;
}
</style>
<div class="badge_image">
<img src="badge-image.jpg" height="75" width="75" />
</div>
<br clear="all" /><br clear="all" />
<img src="badge-image.jpg" height="75" width="75" class="badge_image" /><!-- works fine -->
try display block for image.
.badge_image img {
display: block;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With