Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70779

Centering content

$
0
0

@IAmos wrote:

Hi

Am I really that slow in understanding ionic pwa or is it just too tricky?
I just want a simple center alignment for the screen, and I couldn’t find how to do it.
<div align="center> that wraps everything didn’t work.
<div class="center> and .center {display: flex; justify-content: center; } in csss … didn’t work.
I read pwa-center directive might do the trick but it’s not…
What am I missing? Such a simple/basic feature and nothing works for me…

Code sample


<ion-header class="center">        
        <ion-toolbar color="primary">
          <ion-item> <<<I tried class="center" here but nothing...
            <ion-img src="assets/icon/logo.png"/>
            <ion-title>Welcome</ion-title>
          </ion-item>
        </ion-toolbar>        
      </ion-header>,
      
      <ion-content class="center">           
        <ion-input required type="email" placeholder="Enter email"/>                  
        <ion-input required type="password" placeholder="Enter password"/>                  
        <ion-input type="password" placeholder="Confirm password"/> 
        <switch>Remember me</switch>
        <ion-button href="" shape="round" size="default">Login</ion-button>      
      </ion-content>

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70779

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>