Jump to Real's How-to Main page

Embed an image into textfield

This can be useful to give a visual cue for a specific field like a mandatory value.
<style>
input.man { background-image: url(../images/mandatory.gif); 
            background-repeat: no-repeat;
            background-position: center left;
            padding-left: 0.5em;
}
</style>

...
<label> Value : <input type=text class=man width=50/></label>

It looks like :


If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2007
[ home ]