• Resolved gwhann

    (@gwhann)


    All,

    I have figured out how to place a background pic on a page and now I need the code to do the same on a post. Can someone help me to do so and explain how to do it for any post? I believe doing this to pages and posts really enhance the site.
    FYI … to place a pic from a URL JPEG you simply find the page number you are working with by going to (All Pages) and place you mouse over the page you desire to work on… at the bottom of your screen the page number will appear. ie…after the post= is the number of your page. Then in your Custom CSS use this code…and the page number for this page is 502

    page-id-502 .wrapper {
    background: url(“https://www.hereismypic.jpg”) no-repeat fixed 0% 0% transparent;
    }
    Any and all help is appreciated!

    Gwhann

Viewing 3 replies - 1 through 3 (of 3 total)
  • The code you want to use is postid-#
    where # is the number of the post which you can find just like the page.

    Another thing you can do as well if look at the source code of pages or posts and look for the body tag. In the body tag you will find something like this for example:

    `<body class=”single single-post postid-1 single-format-standard logged-in admin-bar no-customize-support …’
    You can use any of these tags to style your .wrapper div.

    Thread Starter gwhann

    (@gwhann)

    So all I have to do is replace page-id with postid and use the correct number of the post and the rest of the code is the same?

    postid-502 .wrapper {
    background: url(“https://www.hereismypic.jpg&#8221;) no-repeat fixed 0% 0% transparent;
    }
    Sounds pretty simple!

    Thread Starter gwhann

    (@gwhann)

    It worked … I did have place a period in front of the word postid as shown below …

    .postid-502 .wrapper {
    background: url(“https://www.hereismypic.jpg&#8221;) no-repeat fixed 0% 0% transparent;
    }

    Thanks so much for your help!

    Gwhann

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Placing a wrapper background picture on a post’ is closed to new replies.