表与div层 [英] table with div layers
问题描述
我有一个表里面的div 1.
I have a table inside a div 1.
然后div 1添加另一个div 2与位置:relative; top:-250;所以div 2层将会在表的顶部。
现在下面的表格有一个大的空间,在页面上的任何东西可以恢复显示(我猜第二个div 2通常没有-250位置变化?)
如何我摆脱的空间,清除它?
我试过这... ...它没有做任何事情
Then after that div 1 added another div 2 with position:relative; top:-250; so that div 2 layer will be right on top of the table.
But now below the table there is a big space before anything on the page can resume displaying (I guess the second div 2 would have normally been without the -250 position change?)
How do I get rid of the space and clear it?
I tried this... ...and it didn't do anything
推荐答案
使用绝对定位而不是相对可以做的伎俩。我会测试这个理论并相应地编辑我的回答。
Using absolute positioning rather than relative may do the trick. I'll test this theory and edit my answer accordingly.
编辑:使用 position:absolute; margin-top:-250px;
似乎是解决方案。
using position: absolute; margin-top: -250px;
seems to be the solution.
这篇关于表与div层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!