I have a text input and when user enters the text, I want it to be centered in the input. I have clicked the Font–>align center option, but text entered still left aligned? I tried Font–>Align Center on a few other text inputs but same result-entered txt still aligns left?
Hello Robert,
There are 2 ways to do that:
-
If you choose the type “text area”:
In this case, you can apply “center” as a value of the property “font align”.
-
If you choose the type “text”:
Here, you need to create a CSS class to the “text input” component and add these lines:
self .m-0{
text-align: center;
}
1 Like
The self .m-0{
text-align: center;
}
worked fine. I had tried self {text-align:center;} but would never have known to try this. Also surprised the align center option fin the Font area did not work. But this .m-0 seems to work fine. Thx.
1 Like
You’re welcome Robert .
Of course it is not possible to apply a “self” text-align for the component “text input” (self here means the component).