Twister1004 Posted February 12, 2009 Share Posted February 12, 2009 Hey everyone! I have a question or ask if it may be possiable. I am wanting to post an image over an <input type="text" /> field. However, I don't believe I can just stick a src="" thing in there. So is there another way to use it like this? Quote Link to comment Share on other sites More sharing options...
deadlyp99 Posted February 12, 2009 Share Posted February 12, 2009 Create a DIV for the image, and one for the input. Then use CSS to position and layer it. z-index in css for the layers. Quote Link to comment Share on other sites More sharing options...
Twister1004 Posted February 12, 2009 Author Share Posted February 12, 2009 Wouldn't that cause confiscations? Edit: Yes it did as I suspected. Thanks for your suggestion though =) Quote Link to comment Share on other sites More sharing options...
alphanumetrix Posted February 12, 2009 Share Posted February 12, 2009 the guy above was too vague, and indecisive. Add class="bg" to your input: <input type="text" class="bg" /> then add this CSS code to your site: input.bg { background:url(link to your background image here); } alternatively, if you don't know CSS, you could put this in your <head>: <style type="text/css"> input.bg { background:url(link to your background image here); } </style> That will put an image in the background of the text field. If you want to actually put an image over a text field, you'll have to do that with how that guy said. Although, I'm 98% sure that's not what you're looking for, because you said add src="". Plus, it's a stupid idea to begin with, because it will keep you from being able to type in the field. Quote Link to comment Share on other sites More sharing options...
Twister1004 Posted February 12, 2009 Author Share Posted February 12, 2009 Thanks bliljerk, This is what I asked for in a way. You have also just increased my CSS now =D. New thing I didn't think was possible. Thank you everyone! Quote Link to comment Share on other sites More sharing options...
Twister1004 Posted February 13, 2009 Author Share Posted February 13, 2009 It's not exactly over the field but it works. So thanks again =D Quote Link to comment Share on other sites More sharing options...
alphanumetrix Posted February 13, 2009 Share Posted February 13, 2009 To get it exact, you'll have to fiddle with the positioning and size. If I seen the exact script and image you were working with, I could help you with that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.