• Resolved strakerc

    (@strakerc)


    Is it possible to have this plugin *only* display the banner on mobile pages? If so, I’ll likely become a paid customer for the page filtering ability – this nearly does everything I want!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author rpetersen29

    (@rpetersen29)

    Hi @strakerc

    yes you can target only mobile by using media queries, https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries, in the Website Custom CSS field.

    The following code hides the banner if the device screen width is greater than 801 pixels, which is around the limit for tablets.

    @media (min-width:801px) {
      #simple-banner {
        display: none;
      }
    }

    If you have header padding or margin you’ll want to do something like:

    @media (min-width:801px) {
      #simple-banner {
        display: none;
      }
    }
    @media (max-width: 800px) {
      header {
        padding-top; 40px;
        margin-top: 10px;
      }
    }

    That will make sure the header padding/margin will only show on devices with a width up to 800 pixels. You would need to remove the padding and margin from the simple banner Header Padding and Header Margin fields as well. Also make sure to play around with that pixel breakpoint to find which value is best for your use case.

    As a side note, adding mobile specific settings has been in the feature backlog for a while now, so I will look to enhance this in a future update.

    Thread Starter strakerc

    (@strakerc)

    You rock! This worked perfectly. Your fast support is a big reason why I’m about to subscribe – thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Have the Banner Only Display on Mobile’ is closed to new replies.