I've made a form, but where I've added a 0px margin to it, it has also applied that margin to text inside the input (e.g. where you would put your name, for a username input) meaning that it's against the left hand edge of the box.
How can I added a margin to the text within the box, while keeping the margin on the box itself?
Thanks in advance.
The <marquee> tag in HTML is used to create scrolling text or image in a webpages. It scrolls either from horizontally left to right or right to left, or vertically top to bottom or bottom to top.
I dont think the people here understand your question completely. The OP is asking how he can apply a margin to the text inside the input form while also still having a margin on the input itself.
His question is stated a little wrong. What he's looking for is how to INDENT the text inside the input. Use:
text-indent: 10px; // or whatever size you need
EDIT: I do realize this is a 7 year old response, but there really aren't any other proper answers to this via google search.
You're looking for padding not margin.
Margin is outside of the element and padding is on the inside
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With