PDA

View Full Version : Resolved Custom background for input boxes - wrong padding



[vengeance]
Nov 8th, 2009, 01:01 PM
Hello.

I want to use custom background images for some of my input boxes. Works great adding it in, however, the padding of the text is wrong. And if I set a padding value to the CSS, it all goes wrong!

Here's an image of how it looks right now:
http://i34.tinypic.com/30jthqd.png

Here's my CSS:


input.custombox {
background: url(elements/custom.gif) no-repeat;
width: 100px;
height: 19px;
border: 0px;
}

met
Nov 8th, 2009, 01:16 PM
can't really tell from the screenshot but if you add padding to the text and the image isn't big enough to accomodate the text you'll run in to display problems

abduraooft
Nov 8th, 2009, 01:55 PM
You'd need to set suitable padding instead of height, say padding:1px 3px;

[vengeance]
Nov 8th, 2009, 06:07 PM
You'd need to set suitable padding instead of height, say padding:1px 3px;

That did the job, thanks!