1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Background behind a section

Discussion in 'Free Divi Community Forum' started by Scott Douglas, Feb 9, 2020.

  1. Scott Douglas

    Scott Douglas Member

    So I've targeted the section in a blog post template, that holds the main content, and have narrowed the width of the section. I've attached a picture of the end result.

    Which area or div or etc would I target to change the colour of the background colour that is outside the narrowed section to the left and right of it?

    And would it just be figuring out what to target then changing the background color?
     

    Attached Files:

    1. PRO MEMBER PERKS Divi Block Pro - Premade dynamic background hover design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    What about:
    1. Set the width of the section back to 100%.
    2. Set the row to have white background.
    3. Set the negative top margin for row, instead of section.

    Then the background color would be the section background.
     
  3. Scott Douglas

    Scott Douglas Member

    It almost worked... when I drop the transparency of the section bg color it works, but there's a shade of the section colour overlapping onto the image.

    I've attached a screenshot of the area for reference.

    Here's the css I have for the section and for the row:

    .spost-content-meta-section.et_pb_section {
    margin-left: auto;
    margin-right: auto;
    padding-top: 5rem;
    background-color: rgba(109, 104, 101, 0.2);
    }
    .spost-content-meta-section.et_pb_section .et_pb_row.spost-content-meta-row {
    margin-left: auto;
    margin-right: auto;
    padding-left: 3rem;
    padding-right: 3rem;
    margin-top: -5rem;
    max-width: 65%;
    width: calc(100% - 1rem);
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    padding-top: 2rem;
    background-color: white;
    }
     

    Attached Files:

    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  4. Scott Douglas

    Scott Douglas Member

  5. Scott Douglas

    Scott Douglas Member

    I figured it out. Had to set the width in the row section, but raise things in the title mod, and mostly mirror the css setup for the title and content mods, but both have to be in the same row.

    This is the CSS that works on desktop, any custom looking classes were ones I created and added to the correlating section, row, mod, etc, incase anyone runs into this challenge:

    .spost-content-meta-section.et_pb_section {
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
    background-color: rgba(109, 104, 101, 0.3);
    }
    .spost-content-meta-section.et_pb_section .et_pb_row.spost-content-meta-row {
    margin-left: auto;
    margin-right: auto;
    max-width: 65%;
    width: calc(100% - 1rem);
    background-color: white;
    }
    .spost-content-meta-section.et_pb_section .et_pb_row.spost-content-meta-row .spost-title-meta-mod.et_pb_module {
    margin-top: -9rem;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    padding-left: 3rem;
    padding-right: 3rem;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    background-color: white;
    }
    .spost-content-meta-section.et_pb_section .et_pb_row.spost-content-meta-row .spost-content-meta-mod.et_pb_module {
    margin-top: 0rem;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0rem;
    padding-bottom: 3rem;
    padding-left: 3rem;
    padding-right: 3rem;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    background-color: white;
    }
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Replace the default archive "Older Entries" with beautiful pagination:Learn More