How to place background image in content area

  • Author
    Posts
  • #106936
    jmfvecu
    Power User

    Hi, I wamt to have different backgroun images for every “content area” page but i cannot figure out how to do it in Mantra I have tried with several plugings but it is not wotking.

    Any ideas please how to accomplish this!!!

    Thanks in advance

    #107107
    Zed
    Cryout Creations mastermind

    Do you mean you want to apply (different) background images to the content of different pages?
    There are plugins that can do this for the site background image, however the content container is specific to each theme and plugins can’t really assume or guess which one it is.
    It is still possible to do this with custom CSS, however you need a different CSS block for each page you want to apply a (different) background image to:

    .page-id-PAGEID #content {
        background-image: url(URL-OF-THE-IMAGE-FILE);
        /* further background configuration */
    }

    Replace PAGEID with the numeric page ID (also works for posts) you want the styling to apply to. You can find this ID in the dashboard (in the editing URLs) or on the frontend as one of the classes applied to the body element.

    You can further customize the positioning and appearance of the background image with other CSS properties:
    https://www.w3schools.com/cssref/css3_pr_background.asp


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #107138
    jmfvecu
    Power User

    Thanks for your reply I will try and let it know!!!

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

The topic ‘How to place background image in content area’ is closed to new replies.