Jquery CSS绝对DIV导致其他绝对DIV问题
我已经实现了一个聊天脚本,它要求在页面内容周围包装一个绝对定位的DIV 这是为了确保聊天窗口位于底部 问题是,由于这个主包装器的绝对位置,所有其他绝对位置的元素(例如Jquery Auto completes、datepicker等)现在都随页面上下滚动 以下是HTML的一个示例:Jquery CSS绝对DIV导致其他绝对DIV问题,jquery,css,chat,Jquery,Css,Chat,我已经实现了一个聊天脚本,它要求在页面内容周围包装一个绝对定位的DIV 这是为了确保聊天窗口位于底部 问题是,由于这个主包装器的绝对位置,所有其他绝对位置的元素(例如Jquery Auto completes、datepicker等)现在都随页面上下滚动 以下是HTML的一个示例: <body> <div id="main_container"> <div id="content">Elements like Jquery Autocompletes,
<body>
<div id="main_container">
<div id="content">Elements like Jquery Autocompletes, Datepickers with absolute positioned elements in here</div>
</div>
我希望有一个简单的修复,因为聊天脚本太好了,无法摆脱
谢谢
提姆
好的,我只是把定位改为相对。一切似乎仍在运行,非常好!我需要测试更多的错误,但感谢您的回答!
#main_container {
width:100%;
background-color:#ffffff; /* DO NOT REMOVE THIS; or you'll have issue w/ the scrollbar, when the mouse pointer is on a white space */
overflow-x: hidden;
overflow-y: scroll;
height:100%; /* this will make sure that the height will extend at the bottom */
position:absolute; /* container div must be absolute, for our fixed bar to work */
}