Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

ionic vertical align center

//Works with Ionic 4,5,6

//CSS
ion-grid{
    height: 100%;
}
ion-row{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

//HTML
<ion-content>

  <ion-grid class="ion-text-center">
    <ion-row>
      <ion-col size="12">
       I am the Center of the World
      </ion-col>
    </ion-row>
  </ion-grid>

</ion-content>
 
PREVIOUS NEXT
Tagged: #ionic #vertical #align #center
ADD COMMENT
Topic
Name
2+4 =