background image

  • Posted in : Bloggy WP
  • ldiano
    Participant

    Is there a way to insert a background image that expands across the entire page but does *not* repeat?

    Thank you for your hard work.

    Mehmet S.
    Keymaster

    Hi,

    – upload your image to your media library.

    – copy “File URL”.

    – include to this code, then use it in your custom css field:

    body
    {
    background-image: url("paste-your-image-file-url-here");
    backgroud-repeat: no-repeat;
    }
    

    Thanks

    ldiano
    Participant

    Will this apply it just to 1 page or all pages? I prefer just 1 page/post of my choosing.

    Thanks,

    Mehmet S.
    Keymaster

    The code above applies to all pages. If you want to apply only 1 page, add page/post id to the code:

    Example (page):

    body.page-id-7
    {
    background-image: url("paste-your-image-file-url-here");
    backgroud-repeat: no-repeat;
    }
    

    Example (post):

    body.postid-62
    {
    background-image: url("paste-your-image-file-url-here");
    backgroud-repeat: no-repeat;
    }
    

    The numbers are ids. You can find a page/post id in your edit screen after publishing.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register