开发者

Floating/hovering tables html

How can I get a table on a webpage to float/h开发者_运维技巧over as you scroll down a webpage. Similar to what is done with ad pics on webpages. I need it as the webpage will require a user to scroll down a lot and therefore this floating table will enable users to quickly change information being pulled from a database.


position: fixed is what you're looking for.

It works in "every" browser, except IE6. (if that's a problem, you can use a JavaScript workaround)

See: http://jsfiddle.net/85MUa/


Will work in all browsers:

position:fixed;
top:0;
height:200px;

From w3schools:

An element with fixed position is positioned relative to the browser window.

It will not move even if the window is scrolled

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜