Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #898163

    Hi everyone, I am trying to show some sections and hide some sections from on mobile vs desktop.

    I tried the following CSS, and applied the appropriate tags (“only-mobile and only-desktop) to each section.

    @media only screen and (min-width: 769px) {
    .only-mobile { display: none !important; }}
    @media only screen and (max-width: 768px) {
    .only-desktop { display: none !important; }}

    The end result is both items show on desktop, mobile and tablet. Any ideas?

    #898288

    Hey 34oldcat29,
    Your tags are ID’s not classes, please try this instead:

    @media only screen and (min-width: 769px) {
    #only-mobile { display: none !important; }}
    @media only screen and (max-width: 768px) {
    #only-desktop { display: none !important; }}

    Please clear any cache plugin and your browser cache.

    Best regards,
    Mike

    #898632

    Thanks Mike. I changed tags to IDs and cleared cache on three separate systems but still show both mobile and desktop sections on all devices. Do you see the same on your end?
    Anything else I may be missing?
    To be clear, I created a page title only for desktops with the “only-desktop” tag. I created a second page title with the “only-mobile” tag.

    #898690

    Hi,
    Yes I’m seeing the same, yet when I add the css to my browser only one or the other will show. Can you please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #898692
    This reply has been marked as private.
    #898702
    This reply has been marked as private.
    #898709

    Hi,
    You had a few errors in your quick css, I corrected and now your site is working. please clear your browser cache and check.

    Best regards,
    Mike

    #898727

    Ha! I see the error now!

    } in the wrong place

    Thank you sir

    #898739

    Hi,

    Did you need further help, or shall we close this thread?

    Best regards,
    Jordan Shannon

    #898747

    Case closed! All working now!

    #898752

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘hiding/showing sections on mobile vs desktop’ is closed to new replies.