I am having troubles for positioning a span with the watermark text on top of an input. The code using GWT+uibinder looks like that:
http://jsfiddle.net/camposcarlos/dMzL4/
and transformed into html looks like that:
instead of having the span overlapped on top of the input field by floating it to the left:
|----------------------------------|
| |------------||--||
| |passwd ||Go||
| |------------||--||
| |
|----------------------------------|
I get it after the input
|----------------------------------|
| |------------| |--||
| | |passwd|Go||
| |------------| |--||
| |
|----------------------------------|
or in the next line if I try to position the span relative to the width of the input
|----------------------------------|
| |------------||--||
| | ||Go||
| |------------||--||
| passwd |
|----------------------------------|
Any ideas on how to solve it?
Thanks in advance.
I have been able to solve it using a nice solution from here.
The trick was to tag the container with a relative position style and the passwordbox and its span with absolute tags. It works with no need of specifying any position! (although I haven’t tried with IE yet)
http://jsfiddle.net/ajMWd/4/