I am trying to apply styles to the text that users enter into a form. There are two things I would like to figure out:
(1) How do I indent/add padding so that the text is not touching the left edge of the element?
(2) How do I change the font and font-size of the text?
Here is an image of the current form element and this is what I am trying to achieve.
You need to apply padding to your element in your stylesheet, either give it a class name or style the input
itself. I added some different colors in there just to show you that you can style it different ways.
.my-input {
padding: 10px;
border: 1px solid blue;
border-radius: 4px;
color: pink;
}
<input type="text" value="some text value" class="my-input" />
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments