Issue
I am working on the Ionic 5 application for iPad/Tablet. I want to increase the font size of ion-input for full app.
I have tried various options
ion-input {
font-size: 20px !important;
}
input {
font-size: 20px !important;
}
But none of it is increasing the font size. I have even tried to increase the browser inspect element there also it has increased the space but font size is same.
My code structure is
<ion-item class="ion-padding-horizontal">
<ion-label class="input-label" position="stacked">Email</ion-label>
<ion-input class="input-text" type="email"></ion-input>
</ion-item>
When I give font size in the input-text class it is just increasing the size of the input, not the font size
Solution
make sure you input is in an ion-item element and then give it your class like this:
CSS:
.size {
font-size: 30px;
}
HTML:
<ion-item>
<ion-input class="size"></ion-input>
</ion-item>
I tested it just now. it works.
Answered By - MahdiJoon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.