I'm having trouble centering an ion-item and it seems slightly off-center. The standard methods like text-align: center
and adjusting padding in ion-content don't seem to be working for me. Can someone please assist?
https://i.stack.imgur.com/QZRNe.png
Here is the HTML code I am using:
<ion-content no padding >
<div style =" text-align: center !important;">
<ion-item style =" text-align: center;"id="projectTitle" color="transparent">
<ion-input placeholder="Project Title" [(ngModel)]="title"></ion-input>
</ion-item>
<div style="text-align: center !important" >
<ion-button color ="transparent">maybe later</ion-button>
</div>
</div>
</ion-content>
And the associated CSS code:
#projectTitle {
margin-top: 300px;
color: white !important;
}
If anyone has a solution, please share. Thank you!