Skip to content Skip to sidebar Skip to footer

How To Add A Img In A Text Field Value

I wanna show a picture inside the default value of a text field. this is what I've tried but it doesn't work.

Solution 1:

you need to put the image as the background of the element..

html

<inputtype="text"class="with-default" value="Word" />

css

input.with-default{
   background: url('../images/left_arrow.gif') 00 no-repeat;
}

Alternatively, if you are flexible about the actual arrow appearance, you could use a unicode char to display the arrow i.e. ⇐

for more unicode arrows: http://www.alanwood.net/unicode/arrows.html

demo: http://jsfiddle.net/6GyVM/

Solution 2:

Why do you want a picture inside a text field? If it's just a decoration, use CSS background image.

Solution 3:

Post a Comment for "How To Add A Img In A Text Field Value"