We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

1man on 06/22/07


Tagged

fix ie6 bug position fixed


Versions (?)


Who likes this?

6 people have marked this snippet as a favorite

jonhenshaw
SpinZ
duandan
joseluis
marcoba
vali29


IE6 Fixed Position Fix


Published in: CSS 


IE6 Doesn't recognize position: fixed. Here is a little hack to fix it. First you must set IE6 to standards mode. You do this by including a strict doctype in the page.

Once IE6 is in strict mode include the following in a conditional comment. Anything you want fixed, set as absolute. The example sticks an image to the bottom left corner.

  1. /* IE6 Fixed position fix */
  2. html, body {
  3. height: 100%;
  4. overflow: auto;
  5. }
  6. body #cornerImage {
  7. position: absolute;
  8. bottom: 0;
  9. }

Report this snippet 

You need to login to post a comment.