# Ion-segment style broken

**URL:** <https://forum.ionicframework.com/t/ion-segment-style-broken/222541>\
**Category:** Ionic Framework\
**Created:** [April 20, 2022, 11:00pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541 "2022-04-20T23:00:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akuma8](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@akuma8](https://forum.ionicframework.com/u/akuma8)\
**Post date:** [April 20, 2022, 11:00pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541/1 "2022-04-20T23:00:56Z")

</div>

Hi there,  
I defined these simple segment buttons:

```auto
  <ion-segment value="present" (ionChange)="segmentChanged($event)" class="ion-margin-top">
    <ion-segment-button value="present" [layout]="'icon-hide'">
      <ion-label>present</ion-label>
    </ion-segment-button>
    <ion-segment-button value="absent" [layout]="'icon-hide'">
      <ion-label>absent</ion-label>
    </ion-segment-button>
  </ion-segment>

```

But the rendering is totally broken, see the attached gif.  
I did not define any custom styling so I don’t understand where the issue comes from.  
I use Ionic v6.0.8.  
Thanks for your help.  
 ![style broken](https://global.discourse-cdn.com/ionicframework/original/3X/d/6/d6288e72041714e510aaffb96277102bbe0d6c5d.gif)

---

<div class="post-metadata">

**Author:** ![Hills90210](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Hills90210](https://forum.ionicframework.com/u/Hills90210)\
**Post date:** [April 21, 2022, 1:02pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541/3 "2022-04-21T13:02:30Z")

</div>

> [@akuma8](#):
>
> `class="ion-margin-top"`

This is your issue. You added this class to the segment. you need to remove this.

---

<div class="post-metadata">

**Author:** ![akuma8](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@akuma8](https://forum.ionicframework.com/u/akuma8)\
**Post date:** [April 21, 2022, 10:52pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541/4 "2022-04-21T22:52:24Z")

</div>

Thanks but even without the `class="ion-margin-top"` the issue is still there ☹

---

<div class="post-metadata">

**Author:** ![akuma8](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@akuma8](https://forum.ionicframework.com/u/akuma8)\
**Post date:** [April 24, 2022, 1:46pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541/5 "2022-04-24T13:46:15Z")

</div>

I think the issue is global and all the style of my application is broken, I have to refresh the application multiple times to have the real style applied. I absolutely don’t know what is going wrong. I will open an issue on StackOverflow hopping someone else will help!

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [April 25, 2022, 4:07pm UTC](https://forum.ionicframework.com/t/ion-segment-style-broken/222541/6 "2022-04-25T16:07:29Z")

</div>

Please create a reproduciable codepen 😊
