Support » Themes and Templates » fixed ‘wallpaper’ or background

  • Hi there, I have been searching for an answer to my question but haven’t quite found it exactly. I have WP 2.9.1 and use Magic Blue. I like to change the background from time to time. When I do i’d like to have a fixed background image which stays in place while posts scroll up or down against it. Can anyone point me to the right place? Thanks in advance, pensisto from

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks tugbucket. I tried your suggestion. I inserted that piece of code into both css and header.php but the background image is still scrolling with the page. ???

    Further info in case of other suggestions.
    This is what is in style.css;

    body {
    margin: 0;
    padding: 0;
    color: #333;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 100.1%;
    background: #777;

    and this is what is in header.php;

    body{ background: #fff url(“<?php bloginfo(‘template_directory’); ?>/images/holly2.JPG”);


    technically….you don’t even need that line in your header.php unless you really want it there….just a personal thing, but I hate css in a css file and inline in a php file.

    You could delete the line from header.php and in your style.css change
    background: #777;
    background: #777 url('images/holly2.JPG') repeat fixed;

    if you wanna keep it in header.php,
    body{ background: #fff url("<?php bloginfo('template_directory'); ?>/images/holly2.JPG") repeat fixed;

    should work fine. I do know this code works as I copied it from my theme, with a fixed background.

    After you make the changes to any css, press ctrl+f5 while looking at your site to refresh the cache and see changes

    (also, I assumed you wanted your image to tile horizontally and vertically, if not deleted/adjust the repeat)

    Hi there RVoodo. Thanks for your suggestion. I tried it as you said but the background image is still scrolling with the page. I want the background to remain still while the page scrolls, just as your own site.??? Pensisto.

    I have solved the problem. I uninstalled and then reinstalled Magic Blue. Then I put in the extra bit about background being fixed and now it is. Don’t know why it had to be done that way but at least its done. Thanks for the suggestions. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘fixed ‘wallpaper’ or background’ is closed to new replies.