Web Hosting Talk







View Full Version : Custom Input Box CSS Help


dhui
07-22-2008, 09:34 PM
Ok, so I am doing this custom CSS input box. I am using a custom background image for both the username and password boxes and I got that working. But here comes the issue. How do I make the cursor not start at the VERY LEFT of the input box? I would like to make it start about a 10 - 20 pixel space from the left of box(because there is a little image there and I don't want the text to be typed over it).

Any help would be appreciated!

Jay August
07-23-2008, 10:30 AM
what you can do best is don't give that background to the input. but to a div surrounding the input. That way you an easily add some padding-left to that div and it will move the input to the right. To hide the input's default styling, just add this to your css:


input {background: none; border: none;}


Good luck!

dhui
07-24-2008, 09:41 AM
yep, that's what I was looking for, thanks.