Can't get menu to stop appearing on mobile version of site

I just did a one page website for a client. I used a template and customised it…but the attached js file keeps calling the menu on the mobile version of the site…

Is there any way I can edit that js file so that on the mobile version of the site, the mobile menu doesn’t show…? Any ideas anyone…

The website is
aci-sms.com
and the code is at Code Pen:
index.htm
style.css
scripts1.js

Hi,

You’ll stand a better chance of getting a response if you can post a minimal code sample which demonstrates the problem you are having. I’m not sure how many people are going to want to download a zip file.

Just so you know, you can post code here:
open up the editor > paste the code > highlight the code > and hit the </> buttonto mark it as code.

A second option is to use a service like JSFiddle or CodePen. CodePen has the advantage that you can embed your pen right here in the forum (just by pasting its url)

It’s also fine to post a link to a site that demonstrates the problem.

2 Likes

Changed it Pullo.

Good stuff.
So we’re talking about the menu at the top of the page, right?
Am I correct in understanding that you want it to disappear when the viewport width is below a certain value?

Yup, mobile view, between 366 and 566px…

I’ve referenced it in the css as: @media screen and (min-width: 366px) and (max-width: 566px)

Thing is though, the menu changes for mobile to a dropdown menu and I think the js file is what handles the switch.

This works for me:

@media screen and (max-width: 566px) {
  nav#sticker-nav{
    display: none;
  }
}
1 Like

Boom! Thanks Pullo! :slight_smile: Happy camper <-----

You’re welcome

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.