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
精彩评论