position: fixed on IE6

By , 13 July 2008

position: fixed on IE6

Just for the record, here's a common workaround for IE's lack of support for position: fixed.

element { top: expression( document.body.scrollTop + 'px' ); }

Oh, and while I'm at it, here is a common workaround for just about every layout defect in Internet Explorer (especially those involving floats):

element { zoom: 1; }

Heck, here's another one to use if your text gets cut off because of incorrectly inherited line-heights in IE:

element { line-height: normal; }

We could go on like this all night really.

position: fixed on IE6

About Roger Keays

position: fixed on IE6

Roger Keays is an artist, an engineer, and a student of life. He has no fixed address and has left footprints on 40-something different countries around the world. Roger is addicted to surfing. His other interests are music, psychology, languages, the proper use of semicolons, and finding good food.

Leave a Comment

Please visit https://rogerkeays.com/blog/position-fixed-on-ie6 to add your comments.