# Round image get cut-off

**URL:** <https://forum.ionicframework.com/t/round-image-get-cut-off/46327>\
**Category:** ionic-v1\
**Created:** [March 14, 2016, 4:07am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327 "2016-03-14T04:07:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 14, 2016, 4:07am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/1 "2016-03-14T04:07:07Z")

</div>

I created a ionic project:

> ionic start test blank

And add a button:

```
<button class="button button-clear" ng-click="">
  <img style="width:50%" class="round-button" src="img/button.png" alt="">
</button>

```

The image is:

![image](https://global.discourse-cdn.com/ionicframework/original/3X/8/0/80e51cabe281773719dec0a2328a53895b7d092d.png)

It’s working fine in browser and Android phone. But in ios simulator. it looks like this:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/b/9b36cbd7eed7478f822cf2e353d0aac3d7c02372.png)

P.S.: If I change the image to rectangle image, it will be fine.

Any idea? Thanks.

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 14, 2016, 10:02am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/2 "2016-03-14T10:02:08Z")

</div>

Nobody encountered the same issue?

---

<div class="post-metadata">

**Author:** ![SDEK](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SDEK](https://forum.ionicframework.com/u/SDEK)\
**Post date:** [March 14, 2016, 4:14pm UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/3 "2016-03-14T16:14:44Z")

</div>

Did you tried giving it a height:auto ?

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 15, 2016, 1:48am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/4 "2016-03-15T01:48:44Z")

</div>

Yes. I tried. But it didn’t help. It only happened for image button and for ios simulator only. Have a look at my code:

```
    <div style="text-align:center;">          
      <img style="width:200px;height:auto;" src="img/round.png" alt="">
    </div>
    <div style="text-align:center;">
      <button class="button button-clear">
        <img style="width:200px;height:200px;" src="img/round.png">
      </button>          
    </div>        

```

Result:

![image](https://global.discourse-cdn.com/ionicframework/original/3X/a/9/a98b4d441aac59241318d821780f4eaaee1c660e.png)

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 15, 2016, 2:20am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/5 "2016-03-15T02:20:45Z")

</div>

Don’t know if it’s bug or not. I modified my code:

```
    <div style="text-align:center;">
      <img ng-click="onClick()" style="width:200px;height:auto;cursor: pointer; " src="img/round.png" alt="">
    </div>
    <div style="text-align:center;">
      <button style="width:120px;height:120px;line-height:120px;" class="button button-clear">
        <img style="width:120px;height:120px;line-height:120px;" src="img/box.png">
      </button>          
    </div>
    <div style="text-align:center;">
      <button class='button button-positive' style="width:120px;height:120px;line-height:120px;">
        Large button
      </button>
    </div>

```

As you can see, no matter what I did. The height of button image is not correct. But the button with text is ok if I change the size.

![image](https://global.discourse-cdn.com/ionicframework/original/3X/1/c/1cdff1e8e09625a9400f8739790ca7e1d17f0122.png)

**P.S.** : Actually the image shape has nothing to do with the problem.

---

<div class="post-metadata">

**Author:** ![SDEK](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SDEK](https://forum.ionicframework.com/u/SDEK)\
**Post date:** [March 15, 2016, 4:32pm UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/6 "2016-03-15T16:32:33Z")

</div>

why are you using the ![]() tag inside the in first place?

check this out, maybe this helps:

> <https://stackoverflow.com/questions/9576843/using-images-inside-button-element>

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 16, 2016, 1:53am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/7 "2016-03-16T01:53:51Z")

</div>

Thanks.

For me, it seems the button height is not changeable in ionic no matter I include img or set image as background. That seems to be the reason of my problem. But anyway I’m able to replace all buttons with just normal images in my case. That will resolve my problem.

---

<div class="post-metadata">

**Author:** ![SDEK](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SDEK](https://forum.ionicframework.com/u/SDEK)\
**Post date:** [March 18, 2016, 9:33am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/8 "2016-03-18T09:33:12Z")

</div>

you can override the css with !important like

```
height: 120px !important

```

did you try that?

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 18, 2016, 10:12am UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/9 "2016-03-18T10:12:15Z")

</div>

Yes. I tried this before.

---

<div class="post-metadata">

**Author:** ![zhouhaowowtv](https://avatars.discourse-cdn.com/v4/letter/z/8e8cbc/32.png) [@zhouhaowowtv](https://forum.ionicframework.com/u/zhouhaowowtv)\
**Post date:** [March 22, 2016, 12:17pm UTC](https://forum.ionicframework.com/t/round-image-get-cut-off/46327/10 "2016-03-22T12:17:34Z")

</div>

No solution works. Currently I changed all button with image. Although it’s no problem to capture onclick event, there is no way for me to set the disabled status like what button did.
