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 Make the header CSS code the same in mobile

Discussion in 'Free Divi Community Forum' started by nurpat07, May 6, 2020.

  1. nurpat07

    nurpat07 New Member

    Hello everyone !!!

    My question is maybe easy for some of you but i'm stuck to find how to make this code working for tablet and mobile version also ?

    I'm pretty sure it's not too complicated but i'm still newbie in this and don't know how to do it.
    If somebody can help me it can be great.
    Thank you in advance !

    This is the code is use to resize the sub-menu and give him some style.
    It works well with the Computer Version of the website but on tablet and mobile it's not working.
    I know I miss the code for it but I'm not sure wich one I need.

    Code CSS :
    ______________________________________________________________________________________

    #top-menu .sub-menu li a {
    font-size: 16px;
    border-bottom: 1px solid #770303;
    width: 100%;
    }

    #top-menu .sub-menu li a:hover {
    color: white !important;
    opacity: 1;
    background-color: #770303;
    }

    #top-menu .sub-menu li {
    padding-left: 0px;
    padding-right: 0px;
    width: 100%;
    }

    #top-menu .sub-menu {
    padding-top: 0px;
    padding-bottom: 0px;
    }
    ______________________________________________________________________________________

    Thanks for the help :)
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Beautifully crafted Divi layout packs for you to kick start your Divi sites:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    In mobile, all menus are combined into 1 & they have different spacing for submenu & thus you can't have the full border line below each menu item.

    But here's CSS to make all mobile menu items appear in the same spacing & add border to all:
    Code:
    Log In or Sign Up to view this code.
     
  3. nurpat07

    nurpat07 New Member

    Thank you for your fast response, I will try it and tell you if it works well...
    Have a great evening !!! :)
     
    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
  4. nurpat07

    nurpat07 New Member

    It works but just one thing, all the elements of the sub menu in mobile and tablet get selected with the same time (same background-color) when I pass the mouse on it, like in the pic...

    How can we fix this please ?

    upload_2020-5-7_21-20-23.png
     
  5. nurpat07

    nurpat07 New Member

    And the page "Contact" get selected like one page only :

    upload_2020-5-7_21-23-31.png
     
    1. PRO MEMBER PERKS Divi Mini Cart Pro Plugin - Instantly add 3 different types of mini cart to your Divi site:Learn More
  6. Divi.Help

    Divi.Help Administrator
    Staff Member

  7. nurpat07

    nurpat07 New Member

    It works well this one, thank you again for your help!!!
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Agency Divi layout pack featuring modern overlay archive blog layout with hover effects:View Demo