我对position: absolute
div 有一些问题。IE7 将其显示在输入旁边,但在普通浏览器中显示在其下方。我该如何解决?我正在使用一些我无法修改的第三方 javascript,因此我无法在input
and之间插入任何内容div
。
<div style="position: relative" id="header">qwe</div>
<div style="position: relative">
<table style="background: red; position: relative">
<tr>
<td>
<input type="text" style="width:200px; " value="a date here" />
<div style="position:absolute; width: 300px; height: 300px; background: #eeeeee;">
[a calendar here]
</div>
</td>
</tr>
<tr>
<td>
[text/inputs/buttons behind the calendar]
</td>
</tr>
</table>
</div>
它只是我为这个问题制作的一个例子。我确实有 position: relative 设置在我的代码中的几个元素上,无论如何 ie7 都失败了。“在它之下”意味着它应该是在单击它以让用户轻松选择某个日期后在该输入下显示的日历。
编辑:重做示例
编辑:[问题解决程序-链接已删除]-单击右侧的“zapytanie i rezerwacja”,然后单击“folwark zamkowy”。您可以在该表单中找到这些日历输入。<a>
在从 javascript 输入之后立即添加包含日历的块。