Email conversation
From | Martin Hollingworth |
To | Me |
Subject | position:fixed workaround |
Date | 24 January 2008 18:52 |
Hi Mark
Thanks for a really useful site.
I read and tried your solution to position:fixed in IE6 and Linus's
solution to the jumpyness. I found why his solution doesn't work on your
page.
The HTML background-color was causing the problem. The only way I could
resolve it was to use
html {
font-family: sans-serif;
color: rgb(56,56,56);
margin: 0;
padding: 12px 30px;
background-attachment : fixed;
background-image : url(230.gif);
}
where 230.gif is a plain image in your choice of colour.
Note the background-attachment needs to be fixed otherwise it starts
jumping again.
Not the best solution perhaps, but I find most of my visitors still use
IE6.
Martin Hollingworth
From | Me |
To | Martin Hollingworth |
Subject | Re: position:fixed workaround |
Date | 26 January 2008 21:27 |
Martin,
> The HTML background-color was causing the problem.
Yes. This is probably because it causes IE to render the BODY and HTML
backgrounds separately, instead of having the normal magical BODY. This
would also mean that position:fixed will no longer work on the BODY, and
only works on the HTML element. That's another thing that IE 6 doesn't
implement properly.
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/