WordPress.org

Support

Support » Themes and Templates » How to place a banner onto background?

How to place a banner onto background?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You use css to place a background image:
    background-image:url(‘paper.gif’);

    You will also want to set the repeat option:
    background-repeat:none;

    So your code should look like this:

    .header{
    background-image:url(‘images/paper.gif’);
    background-repeat:none;
    }

    It’s not PHP. It’s CSS, so you will need to make changes to your theme’s stylesheet. Upload the image you want to use (eg: logo.jpg) to your themes ‘images’ folder then add the following to the theme stylesheet:

    body(
    background-images:url(images/bg.jpg);
    background:repeat:no-repeat;
    background:position:left top;
    }

    This will place the logo image in the top left of your page. Bear in mind that these are very generic instructions and the logo may not display correctly in your theme/design.

    I tried to put a small background image in once and it created a conflict with the background color i.e. it over-rode the background color and so the background just white

    @mjmitche: When adding an image to a page that already uses ‘background’, use the method above. Or try the composite css background declaration:

    body{background:#fff url(images/bg.jpg) no-repeat left top;}

    Thanks esmi

    Can i just put this code in the css without touching the php files ?
    Also, do i not need toput the code into a div ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to place a banner onto background?’ is closed to new replies.
Skip to toolbar