1) molendijkGroup: Members Posts: 78Joined: 29 Nov 2005Location: The Netherlands (Groningen)IP: 84.86.--.--
Posted:
Hallo Angus, Sorry to bother you again about ways of achieving 'position:fixed' in IE. Just by accident, I found out that something like the following yields a fixed position in IE AND in normal browsers:
style="position:fixed;top:50%;left:2%;^position:absolute;top:expression(e v al(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop+screen.height*0.35 : document.body.scrollTop+screen.height*0.35);"
You can replace the '^' by all sorts of (combinations of) symbols; the thing will continue to function OK (even in IE6 if you use '*+'), as long as you don't use aphabetic or plain numeric characters.
Is this a known fact? I didn't find it with Google. I tested it with many browsers except with IE7 (don't have that one).
I am very curious to know what you know about this.
Arie.
Arie.
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 192.188.--.--
Posted:
I'd prefer to use IE's dedicated "conditional comments" (google for more) as it allows you to target specific versions of MSIE.
Otherwise, it's always good to use one way that works across all browsers. You can "fake" position:fixed by putting your content in a browser-window-sized <div> and using overflow:scroll on that, with other elements placed above/flow it -- that can work the same way everywhere.
Good luck - Angus.
3) molendijkGroup: Members Posts: 78Joined: 29 Nov 2005Location: The Netherlands (Groningen)IP: 84.86.--.--
Posted:
Thanks a lot. I agree on using the conditional comments.