Site logo

[Resolved] Hide-on-mobile not working after importing page

Home Forums Support [Resolved] Hide-on-mobile not working after importing page

Home Forums Support Hide-on-mobile not working after importing page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2497374
    Harvey

    Hi,

    I’ve imported a page I created on site 1 into site 2 (which has generateblocks installed) – I’m trying to use the css class ‘hide-on-mobile’ on some of my elements on the new page at https://harveymeale.com/test5/ – the elements are simply showing still as though I’d never added this class.

    The hide-on-mobile functions perfectly on the original site however (I just used WordPress export tool and imported XML of the page into above site).

    Any ideas?

    Cheers

    #2497472
    Harvey

    Also on this page, I’m using some outer z-index and inner z-index stuff which is playing up after importing…

    Here’s the section I’m referring to:

    https://i.imgur.com/BYYoylU.jpg

    The tabs on the left, ‘best for xzy’ are supposed to be in front of the background (the top one, ‘best overall’ is functioning perfectly. the next 3 have the same zindex values as the top one yet have the vertical line going through them.

    The parameters appear to be identical to the page I imported from the original website: https://i.imgur.com/14XOfs6.jpg

    Yet in the https://harveymeale.com/test5 page, only the ‘best overall’ is functioning properly.

    To confirm, I didn’t touch any of the zindex numbers after export/importing and they all appear to be as they were on the original..

    To make it even spookier, on mobile version of that page, none of them are working (not even the top ‘best overall’ flag)

    Any ideas? 😀

    #2497493
    David
    Staff
    Customer Support

    Hi there,

    that site looks to be using a different theme.

    1. the hide-on-* classes are built into GPs stylesheet.

    2. thats not a z-index issue,
    those containers have a background color that is set to one of the GP Global colors, but as they are not being loaded in the theme those backgrounds are transparent.
    The first one is correct as it has a #ffffff background color set.

    #2497691
    Harvey

    Ah yep, so I’ll need to find some custom css to hide the elements if not using genrpess?

    Right, looks like you’re spot on re the zindex stuff too.

    Thanks David. 🙏

    #2497694
    David
    Staff
    Customer Support

    GB Pro has them built into the Advanced Tab of the GB block.

    Or you need some CSS;

    @media (max-width: 768px) {
        .hide-on-mobile {
            display: none !important;
        }
    }
    @media (min-width: 769px) and (max-width: 1024px) {
        .hide-on-tablet {
            display: none !important;
        }
    }
    @media (min-width: 1025px) {
        .hide-on-desktop {
            display: none !important;
        }
    }

    Or just use GP 🙂

    #2497697
    Harvey

    Awesome!
    And the world would be a better place if everyone just used gpress! – I’m putting together these templates for the less fortunate haha

    Thanks for your help as always David. 🙏

    #2498619
    David
    Staff
    Customer Support

    🙂 Glad to be of help

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.