# Scale text to fit into button

**URL:** <https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769>\
**Category:** ionic-v1\
**Created:** [May 11, 2016, 1:37pm UTC](https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769 "2016-05-11T13:37:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheTed](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@TheTed](https://forum.ionicframework.com/u/TheTed)\
**Post date:** [May 11, 2016, 1:37pm UTC](https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769/1 "2016-05-11T13:37:07Z")

</div>

Hello, everybody. I’m trying to make a long text to be showing despite phone resolution and not cutting it off like the image below. I’ve tried making it bigger using ionic button-large or button-bar class and other methods from the Ionic docs, but none of them makes the contend take the full width of the button. My overall idea is to be equally grid positioned buttons with text displayed in full width. Just to mention this only happens (cutting the text off) on devices below around 600 Width and in landscape this doesn’t happen.

Cutting text off

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/d/4/d43cdc18da3f32bb55cfb51b1528338f54add6be.PNG)

Doesn’t cut it off

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/7/a/7a972b060079da40d3319172f914508363200695.PNG)

---

<div class="post-metadata">

**Author:** ![macfam](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/macfam/32/100004_2.png) [@macfam](https://forum.ionicframework.com/u/macfam)\
**Post date:** [May 11, 2016, 9:34pm UTC](https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769/2 "2016-05-11T21:34:17Z")

</div>

Hello @TheTed have you tried something like [FitText](http://fittextjs.com/)?

Otherwise, you would need to write custom css based on media queries that detect page width. At smaller page widths you would have to set font-size of the button text smaller.

---

<div class="post-metadata">

**Author:** ![TheTed](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@TheTed](https://forum.ionicframework.com/u/TheTed)\
**Post date:** [May 12, 2016, 10:43am UTC](https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769/3 "2016-05-12T10:43:47Z")

</div>

Fantastic @macfam. Thank you so much, man 🙂 . It fit my needs exactly like it is made for me and it will come handy for other projects.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [May 12, 2016, 11:05am UTC](https://forum.ionicframework.com/t/scale-text-to-fit-into-button/51769/4 "2016-05-12T11:05:17Z")

</div>

instead of using javascript or jquery plugins try using pure css:

> **[Viewport Sized Typography | CSS-Tricks](https://css-tricks.com/viewport-sized-typography/)**
>
> CSS3 has some new values for sizing things relative to the current viewport size: vw, vh, and vmin. It is relevant to bring up now, because it's shipping i

take a look at the viewport sizing
