Digital Genetics

Fixed positioning for IE7

by on Aug.19, 2009, under CSS, development

Let me begin by simply stating that it would be so much easier if everyone stuck to the standards and played nice!

With the release of IE7, came a semi-adherence to CSS standards and finally acknowledgement of fixed positioning. so why does it not work when I specify position:fixed; within my css? well, this is a problem that continues to annoy me but is easily overcome.

The problem lies within the doctype as specified by your HTML Page.  Simply specify (the strict mode equivalent should also allow for fixed positioning):

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>

and it should rectify the problem :-D

For further information on element position from a microsoft point of view, visit http://msdn.microsoft.com/en-us/library/ms533005%28VS.85%29.aspx

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
:

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...