Forums

Help changing background color to a background image. (7 posts)

  1. myimoogi
    Member
    Posted 1 year ago #

    I need help changing my background color to an image.

    I looked at my style sheet, but wasn't sure if I had the right code. Or will I need to add my own code to insert my image.

    http://www.myimoogi.com

    Here is the code I thought I would need to replace. I inserted my image here but nothing happened.

    body{background:#000 url(images/bg.png) repeat-x center bottom

    I searched the forum before I posted my question and the reply that was relevant was from 4 years ago and didn't apply to the current version of wordpress.

  2. Avnish Awasthi
    Member
    Posted 1 year ago #

    first of all check bg.png exist in images folder.
    then use this in style.css
    body{background:#000 url(images/bg.png) repeat-x center bottom}

  3. Abinav Thakuri
    Member
    Posted 1 year ago #

    the css code you're using is correct...make sure you have the image bg.png in the images folder..maybe you've made a mistake while naming it?

  4. Digital Raindrops
    Member
    Posted 1 year ago #

    body{background:#000 url(images/bg.png) repeat-x center bottom

    Silly Question?

    You do have the style closed correctly ( closing Brace ; } )

    body{background:#000 url(images/bg.png) repeat-x center bottom; }

    HTH

    David

  5. Abinav Thakuri
    Member
    Posted 1 year ago #

    oh damn...the second one was correct though..

  6. myimoogi
    Member
    Posted 1 year ago #

    Thank you everyone for the help.

    My file is in the right place and I do have a closing brace.

    My challenge maybe just exists with the theme that I'm using. I've done this with other themes and have had no problem.

    Will continue to work on it.

  7. Digital Raindrops
    Member
    Posted 1 year ago #

    Hi,
    The background image at the moment is the pink banner, url("http://myimoogi.com/myblog/wp-content/uploads/artistic_03.jpg")

    you also have a disabled page/header background!

    myimoogi.com (line 8)
    #page {
        background-image: none;
    }
    
    style.css (line 29)
    #page {
        background: url("images/header.jpg") no-repeat scroll center top transparent;
    }

    So is there is a theme option style which is set after the style.css, can you not just replace it there, likely in header.php?

    The other option is to overide it by making it !important and losing the pink banner!

    body{
    background:#000 url(images/bg.png) repeat-x center bottom !important;
    }

    HTH

    David

Topic Closed

This topic has been closed to new replies.

About this Topic