Skip to content Skip to sidebar Skip to footer

Css Text Input Field Not Aligning Top Left?

I'm trying to have an Input Text Field display the text on the top left, right now the text is centered vertically and horizontally in the middle.

Solution 1:

Text inputs are for single line input. I would suggest using <textarea> instead.

Example: https://jsfiddle.net/z58vy354/

Solution 2:

you should use textarea instead of input try this code:

<textarearows="20"cols="50">
Test
</textarea>

Solution 3:

As other have suggested to use textarea instead of input field but you if don't wanna it to look like textarea or stretchable, you can use style resize:none; on it.

Solution 4:

Target the input's placeholder

.userInput::placeholder {
    text-align: left;
}

Post a Comment for "Css Text Input Field Not Aligning Top Left?"