Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to display an image in text field in html?

Can we display image inside a text field in html?

Edit

What I want to do is to have an editable area, and want to add html objects inside it(i.e. button, image ..etc)

like image 799
Adham Avatar asked May 22 '12 03:05

Adham


1 Answers

Image in text field:

You can do it with CSS.

Look this example:

http://jsfiddle.net/oscarj24/zy7YP/1/

CSS:

.icon {
    background:#FFFFFF url(http://icons.iconarchive.com/icons/gakuseisean/ivista-2/16/Start-Menu-Search-icon.png) no-repeat 4px 4px;
    padding:4px 4px 4px 22px;
    height:18px;
}​

HTML:

<input type="text" name="sample" class="icon">​

According to your post edit, maybe this helps.

Editable area with objects inside:

http://jsfiddle.net/oscarj24/VSWNX/

like image 163
Oscar Jara Avatar answered Nov 02 '22 05:11

Oscar Jara