• Resolved haasan

    (@haasan)


    Hi, I am wondering how to change the background to a picture.

    My picutre is on https://www.heartstonenorge.no/heartstone.jpg

    Ive tried to change the style.css-file from this:

    body {background-color:#293136; color:#293136; font-family:’Oxygen’,sans-serif; font-size:16px;}
    h1, h2, h3, h4, h5, h6 {margin-top:0;}
    a {color:#3485b4;}
    a:hover {color:#293136;}
    #content-holder {background-color:#fff; margin:0; padding:30px;}

    To this

    body {background:#293136 url (images/heartstone.jpg; color:#293136;

    As well as

    body {background:#293136 url (hearthstone.jpg); color:#293136;

    What am I doing wrong?

    Thanks in advance for your answer.

Viewing 5 replies - 1 through 5 (of 5 total)
  • For starters, there is definitely something wrong with your CSS and spelling:

    body {
    	background: #293136 url(heartstone.jpg);
    	color: #293136;
    }

    You’re missing brackets, and you have an invalid space between url and ()
    You should also figure out if it is either hearthstone or heartstone. You should as well find the correct path to your image.

    I can’t even look at your page, because you linked it wrong.

    Thread Starter haasan

    (@haasan)

    Realy sorry, my english is not the best, but I should at least try spilling the name of the site right. Valid url: https://www.hearthstonenorge.no
    and for the picture: /hearthstone.jpg

    This is how it now looks now:
    body {background: #293136 url(hearthstone.jpg); color:#293136; font-family:’Oxygen’,sans-serif; font-size:16px;}
    h1, h2, h3, h4, h5, h6 {margin-top:0;}
    a {color:#3485b4;}
    a:hover {color:#293136;}
    #content-holder {background-color:#fff; margin:0; padding:30px;}

    Still the background doesn’t change

    This is what you need:

    body {
    	background: #293136 url(https://hearthstonenorge.no/hearthstone.jpg);
    	color: #293136;
    	font-family: 'Oxygen',sans-serif;
    	font-size: 16px;
    }

    You set your path to the image wrong. You navigate to it from the folder your stylesheet is in.

    Thread Starter haasan

    (@haasan)

    Thank you so much! It worked. You are my hero to day <3

    Theme Author wpmultiverse

    (@wpmultiverse)

    Glad you sorted out your problem haasan – the theme looks really good with that background picture.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘From color to background picture’ is closed to new replies.