0

I need to remove the hamburger menu when a user is viewing the community site on a mobile device. I'm told I can do this via CSS, but I'm not sure how. Any ideas?

Doesn't seem like there are any declarative options out there. I found information pertaining to Mobile Publisher, but that doesn't apply.

Thanks!

  • media queries and css (display: none) – Luís P. A. Jan 04 '23 at 17:48
  • Does this answer your question? [Detect if a browser in a mobile device (iOS/Android phone/tablet) is used](https://stackoverflow.com/questions/14942081/detect-if-a-browser-in-a-mobile-device-ios-android-phone-tablet-is-used) – technophyle Jan 04 '23 at 18:02
  • Can you share the CSS you have, so that we can see what's going wrong with the media query in the below answer? – RiverTam Jan 04 '23 at 18:55
  • First: '@media screen and (max-width: 776px){ .hamburger-menu{ display: none; } }' Second: '!important @media screen and (max-width: 776px){ .hamburger-menu{ display: none !important; } }' The first one did nothing and gives no errors. The second one gave an error (red circle x) of "Unexpected token '!important' at line 7, col 1. I removed the ! at the beginning and now the error is Expected LBRACE at line 7, col 11. – Stephanie Boggs Jan 05 '23 at 18:37

1 Answers1

0
@media screen and (max-width: 776px){
  .hamburger-menu{
    display: none;
  }
}
Ram Ratan Bairar
  • 164
  • 1
  • 11
  • I saved this and published the site and the hamburger menu is still there. I updated the max width to 600 to see if maybe my screen is too large and it still didn't disappear. – Stephanie Boggs Jan 04 '23 at 18:12
  • try to put !important @media screen and (max-width: 776px){ .hamburger-menu{ display: none !important; } } Also please check the meta for responsive is there in the document. If it is not working please share more information. – Ram Ratan Bairar Jan 04 '23 at 18:15
  • Pasting that gave an error (red circle x) of "Unexpected token '!important' at line 7, col 1. I removed the ! at the beginning and now the error is Expected LBRACE at line 7, col 11. – Stephanie Boggs Jan 04 '23 at 18:51