skip to Main Content

Can find plenty of info on how to hide mailchimp on a mobile but looking to do the opposite. Have tried adding the code below to the css but doesn’t work.

@media (min-width: 500px) {
    #modalContent { 
        display: none !important;
        visibility: hidden !important;
    }
}

Suspect I’m using the wrong class?

2

Answers


  1. Chosen as BEST ANSWER

    OK think I've sussed this out, unless anyone want to correct me? The class is as below

    @media( min-width: 500px ) { #PopupSignupForm_0 { display: none !important; visibility: hidden !important; } }

    Am I right?!


  2. Hello you can try JavaScript for it you will able to detect Mobile, tablet and desktop devices separately.

    function detectMob() {
          const toMatch = [
          /Android/i,
          /webOS/i,
          /iPhone/i,
          /iPad/i,
          /iPod/i,
          /BlackBerry/i,
          /Windows Phone/i
          ];
    
          return toMatch.some((toMatchItem) => {
            return navigator.userAgent.match(toMatchItem);
          });
        }
    
        function detectTab()
        {
          var userAgent = navigator.userAgent.toLowerCase();
          return isTablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent);
        }
    
        if(detectTab() == true)
        {
          console.log('tab');
    
        }
        else if(detectMob() == true)
        {
          console.log('mob');
        }
        else
        {
          console.log('desktop');
        }
      
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search