Michael E. Engelby

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMichael E. Engelby
ToMe
Subjectbackground-attachment: Fixed; IE version 6.0
Date26 April 2005 16:01
Mark,

I am reading with interest your website.  When I was looking for things
about IE specific scrollLeft & scrollTop DOM properties, I stumbled across
your site.  The page about IE not supporting background-attachment: fixed
on tags other than BODY has me curious.  Since this is the exact thing I am
doing on business website I have designed.  I've fixed attached a .jpg
image to a DIV and it the page scrolls just fine.  [sample URL]  If you do
decide to wade through the mess of code, the CSS class 'content' is the
specific part in question.

Now this might be one case where it does work and your technique happens to
be better for a wider range of versions for IE browsers.  I don't claim to
understand all the details of the CSS.  I am still learning the finer
details of CSS and the way IE implements it (or doesn't depending on your
point of view).  Perhaps this one case will prompt another experiment, or
perhaps it will get tossed in the bucket of 'bloody obvious things that
stupid people felt compelled to tell me'.

Either one is ok by me.  I thank you for your site and the sharing of
knowledge.
FromMe
ToMichael E. Engelby
SubjectRe: background-attachment: Fixed; IE version 6.0
Date26 April 2005 22:01
Michael,

> I've fixed attached a .jpg image to a DIV and it the page
> scrolls just fine.

Interesting. Because you set overflow:auto; it works. It seems that IE
extends support for background-attachment:fixed; to any element that has
scrollbars. But the attachment relates only to the element itself, so if
the body could also scroll, it would stay fixed to the div only, not the
viewport as it should be. And it still gets the position wrong. But it is
an interesting observation. I will consider adding a note about it to the
page.

Thanks for the info.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.