How to align texts inside of an input with CSS?

Spread the love

Sometimes, we want to align texts inside of an input with CSS.

In this article, we’ll look at how to align texts inside of an input with CSS.

How to align texts inside of an input with CSS?

To align texts inside of an input with CSS, we use the text-align property.

For instance, we write

input {
  text-align: right;
}

to align the text in the input to the right.

Conclusion

To align texts inside of an input with CSS, we use the text-align property.

Leave a Reply

Your email address will not be published.