Support » Themes and Templates » Changing the background to an image

  • Hi

    Is it possible to use an image as a background?

    If so, how do I do that?

    Have tried to put my image url in but it doesn’t work.

Viewing 1 replies (of 1 total)
  • Yes, its done all the time. If you are adding the code into the stylesheet, the URL is relative to the stylesheet. Translation: put it in the images folder that is within your theme’s folder

    background-image: url(images/myimage.jpg) no-repeat;

    if you add it into header.php the url has to be the full path
    #mydiv { background-image: url(<?php bloginfo('template_directory'); ?>/images/myimage.jpg) no-repeat; }

Viewing 1 replies (of 1 total)
  • The topic ‘Changing the background to an image’ is closed to new replies.