The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Issues with ‘background-attachment: fixed’ in IE

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #26407

    I’m working on a website ( that consists of a centered wrapper div with a large background image inside the div. The website displays correctly in Firefox 3.5, but in IE 7 or 8 it renders my fixed background image relative to the viewport instead of relative to the centered div.

    At first I figured I could use a conditional comment to position the background image, but that doesn’t work because the div is centered. So, when the screen is resized it throws the whole layout off.

    I’ve searched google and such, but find nothing enlightening. Any help would be greatly appreciated. I went live with my test site so that you can see the differences in your own browsers.

    Thanks in advance.


    well, i found that if you remove the position: fixed on your background, then the image stays put, however, you will need to modify it a small bit


    I’m a little confused as to exactly what your goal is, but I would try using this to keep the background image centered in div:

    background-position: top center

    Thanks for your advice. Although, this was a really stupid question in retrospect.

    My goal was to line up the stripe in the background image with the logo and the secondary-content div while having a fixed background-attachment. I succeeded in doing this on my machine, a 12 inch PowerBook. I wasn’t thinking that the background wouldn’t stay aligned on a different monitor size or resolution. My bad! This is not an IE issue at all.

    Sorry, guys.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.