Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #703445

    Hi there,

    I’d like to have a different body background image for each main menu item on my site. I’ve tried the suggestions I’ve seen in other posts for adding an image to a single page and so far it’s applying the image to the boxed content area, not the body. Can you help me apply the image to the correct location? And can you help me apply those guidelines to main menu parent items? I’m using the most-up-to-date versions of WP & Enfold. Thank so much!

    #703497

    Realized it might be helpful if I list the code I’m using. Here’s the code for the homepage:

    .page-id-5 .bg_container { 
        background-image: url("mylinkhere");
    }
    
    .bg_container {
        background-attachment: fixed;
        background-clip: border-box;
        background-color: #ffffff;
        background-origin: padding-box;
        background-repeat: no-repeat;
        background-size: cover;
    }
    #703500

    Hi,

    Glad this is sorted for you and Thank you for sharing your solution.

    If you have more questions please feel free to ask us via new ticket.

    Thank you for using enfold :)

    Best regards,
    Vinay

    #703515

    No, it’s not sorted. This code doesn’t work :( If you follow the link to my site you’ll see that there’s no background image, just white space. Can you help?

    #703686

    Hi,

    Try to use this code:

    .page-id-5 {
        background: url('image.jpg') !important;
        background-attachment: fixed !important;
        background-clip: border-box;
        background-repeat: no-repeat !important;
        background-size: cover !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .page-id-5 #wrap_all {
        max-width: 90%;
        width: 1375px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .page-id-5 #main, .page-id-5 .main_color, .page-id-5 #footer, .page-id-5 #socket {
        background: transparent !important;
    }

    Hope this helps :)

    Best regards,
    Nikko

    #703735

    Thanks Nikko! Because I want my content area to stay white, with my background image only showing on either side of the content area, I adjusted the code you provided (deleted the last section). Works great.

    My next question is: How can I apply one page background to a parent menu item and all it’s children without having to code each one separately? Because child pages will be added and deleted with frequency this is important. Super appreciate your help!

    #704943

    Hi,

    You can use same code above but just change the page id of parent is 7 the parent page will have this class .page-id-7 and the all the child pages will have this class in common .parent-pageid-7. Let us know if this helps :)

    Best regards,
    Nikko

    #706526

    Thank you! This works perfectly on all pages, but not on the blog or event pages. Any thoughts on how to do this for those pages?

    #706903

    Hi,

    Here’s the list:
    blog (parent) – #top.category-blog
    blogs (single post) – .single-post

    event (parent) – #top .post-type-archive-tribe_events
    events – .single-tribe_events

    Best regards,
    Nikko

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.