Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Text won't start in the top left of Text Box

I have an input description box with a fixed height and width and its own style. The text is centred but I want it to start in the top left.

HTML

<input id="eventDescriptionInput" placeholder="Description" />

CSS

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

#eventDescriptionInput {
padding: 10px;
width: 100%;
height: 200px;
box-sizing: border-box;
margin-bottom: 25px;
border-radius: 3px;
outline: none;
border: none;[enter image description here][1]
box-shadow: 0px 0px 3px gray;
}

>Solution :

If you want to continue using input instead of textarea you want to remove height: 200px; and add padding-bottom: <number>px:

#eventDescriptionInput {
padding: 10px;
width: 100%;
box-sizing: border-box;
margin-bottom: 25px;
border-radius: 3px;
outline: none;
border: none;
box-shadow: 0px 0px 3px gray;
padding-bottom: 200px; /* new line */
}

Though I would recommend using textarea as mentioned by someone else

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading