Adding background image on main page – TheStyle theme

  • Unknown's avatar

    Trying to use CSS to add a background image and this should be an easy question i hope!

    I need to know where the relative URL is to pull my image. I tried using the image URL from one of my uploaded pictures but nothing is showing up on my page. See example below.

    The code i’m using is

    body {
    background-image url(https://lowbrowcomics.files.wordpress.com/2016/10/ironfistlogo.png);
    background-repeat: no-repeat
    background-attachment: fixed; }

    Thanks in advance!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hey there,

    You’re really close! All you were missing was a colon and a semi-colon :)

    body {
    background-image: url(https://lowbrowcomics.files.wordpress.com/2016/10/ironfistlogo.png);
    background-repeat: no-repeat;
    background-attachment: fixed;
    }

    Let me know if that doesn’t work!
    Sage

  • Unknown's avatar

    That’s the trick! Thanks Sage!

    One more thing and i’m good, I need to make the image a tad smaller. What is the code for that?

  • Unknown's avatar

    And is there a way to lower the positioning of the background to under the top banner?

  • Unknown's avatar

    Hey there,

    body {
    background-image: url(https://lowbrowcomics.files.wordpress.com/2016/10/ironfistlogo.png);
    	background-repeat: no-repeat;
    	background-attachment: fixed;
    	background-size: 600px;
    	background-position: center center;
    }

    Not entirely sure where you wanted the background image to show, but you can feel free to edit the background-position as well with replacing the “center center” with px values.

    Let me know if you have any further questions!
    Sage

  • The topic ‘Adding background image on main page – TheStyle theme’ is closed to new replies.