Franki

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromFranki
ToMe
SubjectMaking Internet Explorer 5.5+ use position: fixed
Date18 May 2005 13:01
Hi Mark,

RE: http://www.howtocreate.co.uk/fixedPosition.html

I hope you can help with having this fixed for a top right corner
(rather than bottom left).

I have played around with codes for over an hour, but cannot seem to
get it to work for a Top-Right fixed position. Can you please help?

Thanks

Franki
FromMe
ToFranki
SubjectRe: Making Internet Explorer 5.5+ use position: fixed
Date18 May 2005 20:28
Franki,

> I hope you can help with having this fixed for a top right corner
> (rather than bottom left).

Here's hoping my email client oes not screw up this formatting:

<style type="text/css"><!--
#fixme {
position: absolute; right: 10px; top: 10px;
}
body > div#fixme {
position: fixed;
}
--></style>
<!--[if gte IE 5.5]>
<style type="text/css">
div#fixme {
right: auto; bottom: auto;
left: expression( ( -10 - fixme.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
top: expression( ( 10 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
}
</style>
<![endif]-->

That should do what you wanted.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.