TAMSHOTS Posted January 28 Share Posted January 28 Hi all whom read this! Currently am running into this issue for a long time regarding my dropdown menus: My website www.capturedwithpassion.com exists out of an English and Dutch version (using duplicate pages), where on desktop everything works all fine. However, on mobile/tablet view it does not show the pages in the drop down menu at the Dutch version (as shown in the video recording). It might be a custom code issue, as it's only the dropdown menu part on mobile view in particular... my brain can't see where the issue is though, hope someone can help out! One of the pages custom code that won't show: <style> #header .header-nav-item:nth-child(1){ display:none } #header .header-nav-item:nth-child(2){ display:none } #header .header-nav-item:nth-child(3){ display:none } #header .header-nav-item:nth-child(4){ display:none } #header .header-nav-item:nth-child(5){ display:none } #header .header-nav-item:nth-child(6){ display:none } #header .header-nav-item:nth-child(7){ display:none } </style> <style> @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(1){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(2){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(3){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(4){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(5){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(6){ display:none } @media screen and (max-width:1511px){ #header .header-menu-nav-item:nth-child(7){ display:none } </style> RPReplay_Final1706443875.MP4 Link to comment
Solution tuanphan Posted January 30 Solution Share Posted January 30 Change your code to this code <style> /* hide items on desktop */ nav.header-nav-list>div:nth-child(-n+7) { display: none; } /* hide items on mobile */ [data-folder="root"]>div:first-child>div:first-child>div:nth-child(-n+7) { display: none; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TAMSHOTS Posted February 16 Author Share Posted February 16 you're amazing, thank you so much!! tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment