web hosting and development forums
Web Design and Development Forums Archive


Index - JavaScript forum

how to create a SMART floating div


Post reply

Hi all. does prototype or scriptaculous offer a way to create a "smart" floating div that follows the screen when scrolling?
tht's called "fixed positioning"
tks =) how can i achieve it?
Position: fixed; in the good browsers
In everything but IE, position: fixed;
In IE you can use position: absolute; and an expression for top: and left:
Hmm.. interesting. i'll look into that. tks a lot
Position: absolute; top: expression(document.body.scrollHeight+'px'); left: expression(document.body.scrollLeft+'px'); For example
And is it any harm if i use both at the same time ? (to ensure all browsers will see the effect) Or should i stick to the expression?
Only IE supports expression() It's their own private addition
So i need to create a conditional in css i suppose
IE 7 supports position: fixed; though, so you will want to make sure you only use the expression for IE 6 and lower




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com