Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/144886-solved-image-over-an-input-field/
Share on other sites

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.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.