Email conversation
From | Joseph Benjamin Dalrymple |
To | Me |
Subject | CSS fixed position ie IE7+ |
Date | 9 May 2009 21:21 |
Mr. Wilton-Jones,
I was browsing for a fix for Internet Explorer's problem with fixed
positioning came across your web site with a great example on the left and
right sides for fixing this problem. However, when trying to implement your
fix I was unable to have any luck with it.
I realized you marked the page regarding the fix as "deprecated" and would
no longer support questions related to it, but I would ask you to at least
help me get fixed positioning to work in IE7. I don't think I have had a
problem with this in the past, but it seems to be having problems.
At the current moment, Windows Update is running and upgrading IE7 to IE8
(which, hopefully, will support fixed positioning for sure), but because IE7
is still largely used by many users and I would like my web pages to
continue to support user's who still use it.
Please consider my request.
Best Regards,
Joseph Benjamin Dalrymple
From | Me |
To | Joseph Benjamin Dalrymple |
Subject | Re: CSS fixed position ie IE7+ |
Date | 11 May 2009 09:14 |
Joseph,
> However, when trying to implement your fix I was unable to have any luck
> with it.
The page documents a fix for IE 6. It is not needed for IE 7 or IE 8
because they support proper CSS fixed positioning - it does not need to
be emulated with scripts.
> help me get fixed positioning to work in IE7
Just use regular CSS:
#menu1 { position: fixed; left: 10px; top: 10px; }
#menu2 { position: fixed; right: 10px; top: 10px; }
...
<div id="menu1">...</div>
<div id="menu2">...</div>
If that's still not working, it's probably because you are not using the
correct doctype, so IE 6, 7, and 8 are using the IE 5 rendering quirks
(meaning they support only the same CSS as IE 5 did). You need to use a
doctype that triggers IE's standards rendering mode. Either a HTML strict or
HTML transitional doctype shown on this page will do:
http://www.howtocreate.co.uk/tutorials/html/structure
You should use whichever of those suits the markup you are using on your
page. Just be aware that standards compliant browsers tend to have just one
quirk with transitional doctypes, relating to how images are aligned inside
tables.
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/