开发者

Table with div layers

I have a table inside a div 1.

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 o开发者_Python百科f the space and clear it? I tried this... <div style="clear:both;"></div> ...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.

Edit: using position: absolute; margin-top: -250px; seems to be the solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜