...

View Full Version : CSS Positioning



Skyzyx
11-13-2002, 11:06 PM
If I have a TABLE with an ID, and I have an external CSS file that positions that TABLE based on it's ID, how would I go about keeping that table always at the top of the screen, even when I'm scrolling down?

Roy Sinclair
11-13-2002, 11:10 PM
If the target browsers are all based on the Gecko engine then position: fixed; would do the trick. For IE & NS 4 you'll have to use position: absolute and add some code to reposition the table every time the screen is scrolled by watching the onscroll event.

redhead
11-13-2002, 11:22 PM
heres a helpful tutorial...

http://javascriptkit.com/javatutors/static.shtml

Bosko
11-14-2002, 05:04 PM
Originally posted by Roy Sinclair
If the target browsers are all based on the Gecko engine then position: fixed; would do the trick. For IE & NS 4 you'll have to use position: absolute and add some code to reposition the table every time the screen is scrolled by watching the onscroll event.

position:fixed works in all W3C compliant useragents,that are: Mozilla,Konqueror and Opera.

Skyzyx
11-15-2002, 11:58 PM
Beautiful! Thanks guys!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum