Vasseurth
Vasseurth

Reputation: 6486

Add padding to the text of a textfield

What i want to do is make it so that the text of a textfield does not go to the end of the textfield. what i have is a textfield with a background image and then a button on the right-most side of the textfield. I would like to stop the text from going under the button. I tried using a padding-right but all that does is move the background image too so it defeats the purpose.

Upvotes: 0

Views: 364

Answers (2)

ElonU Webdev
ElonU Webdev

Reputation: 2459

If it really is moving the background, you could try shifting it back using background-position

background-position: 30px 0px;

Upvotes: 0

citizen conn
citizen conn

Reputation: 15390

Padding is the way to go. If your background image isn't lining up right after applying padding, then you need to make your background image accommodate for the padding.

Upvotes: 1

Related Questions