One Page - Mobile Menu Struggles [mobile section ID's]

edited January 2017 in Menu / Mega menu
Hello,

I build a one page website: www.voeles.nl Because of some troubles with responiveness, I build multiple sections. Those sections are specified for mobile or desktop. So, in these the section ID's (one for desktop, one for mobile) for one menu-item are the same. Unfortunately, the mobile-menu-items of these sections doesn't work, probably because of the double ID's. I can't find a solution for this so far.

How can I solve this problem?


Comments

  • Hi,

    as you said, ID's does not work because you can not have double ID's. To avoid this situation, each mobile section need to have the same postscript at the end. So the proper ID's of section should be as following:
    section1
    section1-mobile
    section2
    section2-mobile
    section3
    section3-mobile
    ...
    but the links of menu should have the same ID as ID for desktop: #section1, #section2, #section3, etc.
  • Hello,

    Thanks for your reaction! I tried to call each desktop-section like 'section1'(filled in at: custom | ID) and the related mobile section like 'section1-mobile' and so on, just like you have written above. Unfortunately, it still doesn't work. I just use 1 menu, for desktop and for mobile. So, the links of menu-items are always the same.

    I am not sure if I have changed everything I have to do. I am not that experienced with working scripts.
    So, do I have to change something else? Or is there another reason it doesn't work?

  • Ok, thanks for the info. We noticed that we forgot about one more thing that need to be added into next theme update but so far, you can sort it yourself with the following custom css:
    @media only screen and (max-width: 767px){
     .section.hide-mobile {
         display: block !important;
         height: 0 !important;
         overflow: hidden !important;
         padding: 0 !important;
     }
    }
  • Thanks, it is solved now!
Sign In or Register to comment.