在显示div时,它始终显示在页面顶部 [英] while showing a div it's always showing at top of page

查看:190
本文介绍了在显示div时,它始终显示在页面顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有休闲CSS风格的div.

i have a div with fallowing css style..

 background-color: #FFFFFF;
border: 1px solid #C3CFD1;
display: block;
height: 480px;
left: 262px;
margin-left: auto;
margin-right: auto;
overflow-x: hidden;
overflow-y: auto;
position: fixed;
top: 44px;
width: 517px;
z-index: 2000;  

我在单击页面下方的按钮时显示此div.问题是..当我打开此div时,它正在打开,但始终在页面顶部..但是我想要的是,它应该始终相对于页面处于打开状态,也就是说,如果我位于页面的较低位置,则应该仅在顶部不打开....jquery中的解决方案也将适用..

i am showing this div on click of button which is lower down in my page..the problem is..when i am opening this div it's getting open but always at the top of page..but what i want is, it should always get open relative to page that is if i am at lower site of my page it should get open there only not at top....solution in jquery will also beappriciated..

任何帮助或建议将不胜感激... !!!
提前致谢!!!

Any help or suggestion will be heartily appreciated...!!!
Thanks in advance!!!

推荐答案

您有没有机会在Internet Explorer中进行测试并处于Quirks模式?我做了一个快速测试,它可以在其他浏览器上运行,但不能在IE上运行.当我从Quirks更改为Standard模式时,它运行良好.

You wouldn't, by any chance, be testing in Internet Explorer and be in Quirks mode? I made a quick test and it works in other browsers, but not IE. When I changed from Quirks to Standard mode, it worked perfectly.

这篇关于在显示div时,它始终显示在页面顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆