Align ion-checkbox to center


#1

This is my HTML:

<ion-item text-center>
    <ion-label>Never Show Again</ion-label>
    <ion-checkbox [(ngModel)]="noTute"></ion-checkbox>
</ion-item>

I am trying to align the checkbox as well as the label to the center, however, the checkbox always remains left-align and the label gets center-aligned separately after the checkbox (screenshot attached). Is there an ionic way of achieving this?

11 PM

I want the checkbox to be located just before the label “Never show again”


#2

Have you found a solution to this? I’m having the same problem…


#3

this happen because you use ion-item which automatically apply few css.
i suggest you to use ion-row and ion-col instead of ion-item.

<ion-row>
<ion-col col-2> <ion-checkbox [(ngModel)]="noTute"></ion-checkbox></ion-col>
<ion-col col-10>Never Show Again</ion-col>
</ion-row>