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 Sticky header different background color on scroll?

Discussion in 'Basic Support Forum' started by Chuck Lasker, Sep 26, 2019.

  1. Chuck Lasker

    Chuck Lasker New Member

    I have a transparent background for the header with white elements. I'd like to make it sticky, but the white elements don't show well over page content. Is it possible to have the background color change when scrolling, to, say, gray?

    Thanks.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade content toggle design for your Divi site without using any plugins:View Demo
  2. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    Log In or Sign Up to view this code.
    Basically, it will change the background color when the section become 'sticky'.

    Two things to note:
    1. Remember to change the color code to your desired color.
    2. To make a section sticky, just go to the Section Settings > Advanced > CSS Class & add free-sticky
     
  3. Chuck Lasker

    Chuck Lasker New Member

    OMG that's so perfect and quick. THANK YOU!!

    https://ecomoptimize.com/
     
    Divi.Help Pro Support likes this.
    1. PRO MEMBER PERKS Divi Block Pro - Premade logo carousel design for your Divi site without using any plugins:View Demo