# How to centered content in ion-col

**URL:** <https://forum.ionicframework.com/t/how-to-centered-content-in-ion-col/77191>\
**Category:** ionic-v3\
**Created:** [January 24, 2017, 1:50pm UTC](https://forum.ionicframework.com/t/how-to-centered-content-in-ion-col/77191 "2017-01-24T13:50:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeeM52](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/deem52/32/101606_2.png) [@DeeM52](https://forum.ionicframework.com/u/DeeM52)\
**Post date:** [January 24, 2017, 1:50pm UTC](https://forum.ionicframework.com/t/how-to-centered-content-in-ion-col/77191/1 "2017-01-24T13:50:37Z")

</div>

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

I would like to center a button in an ion-col. What’s the best way to achieve this?  
This is my html code:

```
     <ion-col width-25>
         <button ion-button icon-left clear>
            <ion-icon ios="ios-heart" md="md-heart"></ion-icon>
            <span class="buttonText">3</span>
         </button>
     </ion-col>

```

I have tried with the following css but it didn’t work

```
    //To center content
    display: flex !important;
    align-items: center !important;
    justify-content: right !important;
```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [January 24, 2017, 3:35pm UTC](https://forum.ionicframework.com/t/how-to-centered-content-in-ion-col/77191/2 "2017-01-24T15:35:54Z")

</div>

Look at the theme docs sass utils, you can apply `text-center`

> **[Ionic Framework](https://ionicframework.com/docs/theming/css-utilities/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

---

<div class="post-metadata">

**Author:** ![ChrisGriiffith](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chrisgriiffith/32/66576_2.png) [@ChrisGriiffith](https://forum.ionicframework.com/u/ChrisGriiffith)\
**Post date:** [January 24, 2017, 3:58pm UTC](https://forum.ionicframework.com/t/how-to-centered-content-in-ion-col/77191/3 "2017-01-24T15:58:08Z")

</div>

Mike, you beat me to the answer :).

Although I always thought the directive should be just ‘center’. The alignment is being applied to more that just text.
