• Hi all,

    I am working on a mixed static page and WP site. I have attached images using “background-attachment: fixed” to two elements, the body and a header. This works fine for the static pages but only the body element works with the WP page.

    So, I am wondering if “background-attachment: fixed” works for other elements other than the body element in WordPress?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hm, I havn’t tested it yet, but why shouldn’t it work? I don’t think there’s a difference between HTML in a header and in a body ^^

    Thread Starter maxwellbalmain

    (@maxwellbalmain)

    Unfortunately the site is only local on my Mac now. I am not getting the effect on The WP page I am getting on the static pages. Its just an extra flourish. The effect will not work on IE6 as well, which I can live with.

    I was just wondering if this is the case with WP as well before I a move on to other “issues.”

    Does your header scroll the “fixed” is meant for scrolling things – if your header scrolls, then yes, the background should remain fixed within the header div while the content text scrolls.

    However, if you’re wanting your header to sit at the top of your page, and stay there, no matter how far down the page the end user scrolls, you’re not looking for “background-attachement:fixed”, you’re wanting “position:fixed;”

    There’s a browser out there that has a problem with this, though – I can’t remember if it’s Firefox or IE – but you can look at “positioniseverything.net”, and I think they have a fix for it there.

    Thread Starter maxwellbalmain

    (@maxwellbalmain)

    Oops!

    This was an error on my part. This confusion had nothing to do with fixed positioning. The problem was that I needed to move my header above the container element to match the markup I had in the static pages. Doing so now makes it work…

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Background image attachments: fixed for body only?’ is closed to new replies.