WordPress.org

Ready to get started?Download WordPress

Forums

How to place a banner onto background? (6 posts)

  1. flashy
    Member
    Posted 5 years ago #

    Hi, all i need to do is put a logo-image onto the background, sounds quite easy but dont know a thing about php coding. Can anyone give me an idea ?

  2. motivatebusiness
    Member
    Posted 5 years ago #

    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;
    }

  3. esmi
    Forum Moderator
    Posted 5 years ago #

    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.

  4. mjmitche
    Member
    Posted 5 years ago #

    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

  5. esmi
    Forum Moderator
    Posted 5 years ago #

    @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;}

  6. flashy
    Member
    Posted 5 years ago #

    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 ?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags