1. LIMITED-TIME SALE Be a Pro Member @ $99 / lifetime & access all our 16+ premium Divi extensions: Divi Block Pro, 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.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.
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Each nav item with different background

Discussion in 'Free Divi Community Forum' started by CSPK, Jan 17, 2025.

  1. CSPK

    CSPK New Member

    I am trying to have each nav item with a hover color, and then when you click on the page, the background color stays.

    In the attached, when I rollover About the background changes to green. When I click on the About page, I want the background to stay green. Right now I can get the hover/rollover color for each nav item to change colors, but I cannot get the background to "stick" once I click on a page.

    So, each nav item will have its own color hover color and then a background color when you are on the page. Is this possible?
     

    Attached Files:

    1. PRO MEMBER PERKS Divi Block Pro - Easy-to-use drag & drop interface to mix & match 456+ premade Divi blocks & export as json file:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    It would be something like this:
    Code:
    Log In or Sign Up to view this code.
    Basically, .current-menu-item is needed to achieve what you want.

    If you're unsure what CSS needed, kindly share your hover CSS.
     
  3. CSPK

    CSPK New Member

    Hi, I tried that and it made the background gray even when that page wasn't active.

    This is the code I am using for two of the menu items.

    Code:
    Log In or Sign Up to view this code.
    If you want to see the website in action so you can visually see what I'm talking about, it's here: https://gatherwithpamela.com/ password is parfait

    So when you roll over Corporate, the background goes purple, and then when you click on the Corporate page, the background stays purple.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

  5. Adrienne

    Adrienne New Member
    Divi Block Pro Divi Ultimate Child Theme Divi Powerful Child Theme Divi Ultimate Archive Plugin Divi Ultimate Blog Plugin Divi Ultimate Header Plugin Divi Ultimate Footer Plugin

    Brilliant. That works. Thank you so much!
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade content toggle design for your Divi site without using any plugins:View Demo