• Resolved florentgum

    (@florentgum)


    Hi,
    I’d like to change the backgrounds of my articles and instead of the white color import an image.
    Does anyone knows how to do that ?
    Thank you
    Florent

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Florent, do you want the same image on every post, or a different one for each post?

    This custom CSS would put an image behind every post and page:

    body  {
      background-image: url(http://i2.wp.com/www.melting-productions.fr/wp-content/uploads/2015/11/Melting-e1448659109772.png);
    }

    You can target a more specific element if you want to restrict it to a specific page or type of page.

    Thread Starter florentgum

    (@florentgum)

    Hi Kathryn,
    If it is possible i’d like a different image for each post.
    Thank you !

    In that case you’ll need to add a different CSS statement for each post, each linking to the image. For example:

    .postid-XX  {
      background-image: url(http://i2.wp.com/www.melting-productions.fr/wp-content/uploads/2015/11/your-image.png);
    }
    
    .postid-XX  {
      background-image: url(http://i2.wp.com/www.melting-productions.fr/wp-content/uploads/2015/11/your-image.png);
    }
    
    .postid-XX  {
      background-image: url(http://i2.wp.com/www.melting-productions.fr/wp-content/uploads/2015/11/your-image.png);
    }

    Replace XX with the real post ID, which you can find by:
    – looking in the browser address bar when editing the post
    – looking at the body tag when viewing source in a browser
    – using a browser inspector on the body tag.

    Thread Starter florentgum

    (@florentgum)

    Thank you very very much Kathryn !!!

    My pleasure. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Change background’ is closed to new replies.