Background image inside text box

I’ve seen dozens of input boxes (<input type=text) which have a background image. I was able to duplicate this rather quickly. However, my image is too narrow from left to right for some of my text boxes. My boxes are of varying lengths. How can I make sure that the image is always as far to the right as possible?
Because it’s intranet, I can’t show you what it’s doing. However, I can show you my code:


.inputBox{
  background-image:url('images/bg2.jpg');
  background-repeat:repeat-y;
  padding-left:20px;
}

.inputBox{
  background:url('images/bg2.jpg') repeat-y right;
  padding-left:20px;
}

That should work.

That did it. Thanks