页面元素未正确悬停,跨浏览器不一致
我在网页上有一个区域,其中有一个日期条目。它旁边有一个按钮,如果单击该按钮,条目右侧应该会弹出一个小日历,允许用户单击所需的日期。
我希望日历弹出并且不中断页面的流程。以下是日历的样式:
div.dateEntry
{
position: relative;
bottom: 25px;
left: 365px;
}
在 Firefox 中,日历会在正确的区域弹出,但它会中断页面流,将日历条目下方的所有内容推下。在 IE 中,日历以静态方式显示,就好像没有应用任何样式一样。什么给?
I have an area on a web page where there is a date entry. Next to it is a button that if clicked, should pop up a little calendar to the right of the entry allowing users to click on the desired date.
I want the calendar to pop up and not interrupt the flow of the page whatsoever. Here is the style for the calendar:
div.dateEntry
{
position: relative;
bottom: 25px;
left: 365px;
}
In Firefox, the calendar pops up in the correct area, but it interrupts the page flow pushing everything below the calendar entry down. In IE, the calendar displays in its static as if no style is being applied. What gives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想要的是将该元素定位为
absolute
而不是而不是relative
,因为这会将其从文档流中删除它可能需要它是“父级”设置为
position:relative;
以确保它仍然在日期输入元素旁边弹出What you probably want is to position that element
absolute
instead ofrelative
as that will remove it from the document flowIt may need it's "parent" set to
position:relative;
in order to make sure it still pops up beside the date entry element