# Ionic 5 Extra padding issue

**URL:** <https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208>\
**Category:** Ionic Framework\
**Created:** [November 25, 2020, 11:59am UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208 "2020-11-25T11:59:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hothoundz](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@Hothoundz](https://forum.ionicframework.com/u/Hothoundz)\
**Post date:** [November 25, 2020, 11:59am UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/1 "2020-11-25T11:59:34Z")

</div>

Just upgraded from v4 to v5 and I’m getting extra padding between images on an ion-card (eg)

```auto
<img images-filter src="../../assets/imgs/xxxxxxx1.jpg" />
<img images-filter src="../../assets/imgs/xxxxxxx2.jpg" />
<img images-filter src="../../assets/imgs/xxxxxxx3.jpg" />

```

In v4 there was no extra padding between the images, in v5 there is and I can’t find out how to remove it without using

```auto
style="margin-top:-4px"

```

In addition, there’s extra padding on the ion-card at the bottom so there’s a border after the last image.

Any ideas how to remove the padding or get around the issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![Daveshirman](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@Daveshirman](https://forum.ionicframework.com/u/Daveshirman)\
**Post date:** [November 25, 2020, 2:53pm UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/2 "2020-11-25T14:53:42Z")

</div>

Why don’t you post your entire markup + screenshot, or even better link to a stackblitz or plunkr - then people could actually help you?

---

<div class="post-metadata">

**Author:** ![Hothoundz](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@Hothoundz](https://forum.ionicframework.com/u/Hothoundz)\
**Post date:** [November 25, 2020, 4:28pm UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/4 "2020-11-25T16:28:20Z")

</div>

OK…just found the answer. Using `<ion-img>` solves the issue 🙂

---

<div class="post-metadata">

**Author:** ![ivanslaughter](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ivanslaughter/32/135036_2.png) [@ivanslaughter](https://forum.ionicframework.com/u/ivanslaughter)\
**Post date:** [January 7, 2021, 3:32pm UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/5 "2021-01-07T15:32:24Z")

</div>

Hi @Hothoundz recently experience this as well, the adjustment vary between 3px - 8px. Did you find other solutions than replacing it with ion-img. Any experience when using img for ion-slides?

---

<div class="post-metadata">

**Author:** ![Hothoundz](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@Hothoundz](https://forum.ionicframework.com/u/Hothoundz)\
**Post date:** [January 7, 2021, 4:54pm UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/6 "2021-01-07T16:54:47Z")

</div>

No other solutions.

For stand alone img use ion-img

I believe that using ion-slide you can just use img

---

<div class="post-metadata">

**Author:** ![rei7](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rei7](https://forum.ionicframework.com/u/rei7)\
**Post date:** [May 6, 2023, 2:51pm UTC](https://forum.ionicframework.com/t/ionic-5-extra-padding-issue/200208/7 "2023-05-06T14:51:59Z")

</div>

The cause of the blank is due to the default display property value of img elements, that is, display:inline, I changed it to block, it solved the problem.  
(disclaimer: this is chatgpt answer inspired solution. But I verified everything it said.)
