...

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



[vengeance]
11-08-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
11-08-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
11-08-2009, 01:55 PM
You'd need to set suitable padding instead of height, say padding:1px 3px;

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

That did the job, thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum