How to change input input cursor?

1
Hello everyone, I think it's a very simple thing, but I'm still half-hearted in HTML. I'd like to know how I can do it right now so that the person clicks on the input that you type in the middle of the box or there may also be some pixel left. . In short, I want the value written to be in the middle of the input box and not at the beginning.

    
asked by anonymous 04.06.2018 / 19:02

1 answer

1

Just use the text-align styles to set, right, left, or center. You can use padding to give space within input , in this example I put 5px down and up, and 15px right / left.

See the example

  
<input type="text" style="text-align: left; padding: 5px 15px;" placeholder="esquerda">
<input type="text" style="text-align: center; padding: 5px 15px" placeholder="centro">
<input type="text" style="text-align: right; padding: 5px 15px" placeholder="direita">
  
    
04.06.2018 / 19:17