重叠的div在页面的右边缘 [英] overlapping divs on the right edge of the page
本文介绍了重叠的div在页面的右边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在将水印文本放在输入顶部时遇到问题。使用GWT + uibinder的代码如下所示:
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/
并转换为html,如下所示:
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||
| |------------||--||
| |
|----------------------------------|
我在输入后得到
|----------------------------------|
| |------------| |--||
| | |passwd|Go||
| |------------| |--||
| |
|----------------------------------|
或在下一行中,如果我尝试将span相对于输入宽度
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.
推荐答案
我已经能够使用here。
诀窍是用相对位置样式标记容器,密码箱和其带有绝对标签的跨度。它工作时不需要指定任何位置! (虽然我还没有尝试过IE)
http://jsfiddle.net/ajMWd/4 /
这篇关于重叠的div在页面的右边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文