Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1057471

    Hello,
    I have spent several hours trying to hide an advanced layerslider in desktop that I would like to only display in mobile, but have not had success. This is the code I have tried:

    @media only screen and (max-width: 480px) {
    #Homesliderdesktop {
    display:none !important;
    }
    }

    #Homeslidermobile { display: none; }
    @media only screen and (max-width: 767px) {
    #Homeslidermobile { display: block !important; }
    }

    Could you please suggest alternative custom css for my Enfold Child Theme, or let me know what else I would need to do? The layerslider I am hoping to display only on desktop is “Homesliderdesktop”, and the layerslider I would like to display in mobile only is “Homeslidermobile.”

    Thank you for your help!

    #1057478

    Hey juliamadigan3,

    Adjust the code to this:

    #Homeslidermobile { display: none; }
    @media only screen and (min-width: 767px) {
    #Homeslidermobile { display: block !important; }
    }

    Best regards,
    Jordan Shannon

    #1057510

    Hi Jordan,

    I added that code to the custom css section for Enfold Child Theme, and the mobile layerslider is still showing on desktop (below the layerslider that I’d like to display). Could you please suggest alternative CSS, or another place where I would need to add the code?

    Thank you!
    Julia

    #1057513

    Hi,

    Try:

    #Homeslidermobile { display: none; }
    @media only screen and (max-width: 767px) {
    #Homeslidermobile { display: block !important; }
    }

    Best regards,
    Jordan Shannon

    #1057515

    Hi There,

    I replaced the first CSS you gave me with the new CSS and the Headslidermobile is still displaying on desktop. I also added the CSS to the Quick CSS section, and nothing changed.

    Do you know of any other ways I could fix this?

    Thanks again,
    Julia

    #1057633

    Hi,

    Please provide admin info so we can log in and look into this issue further.

    Best regards,
    Jordan Shannon

    #1298191

    Is there an easy way to do this from the wordpress cms?

    #1298427

    Hi social9499,

    You will need custom CSS, please post a link to where we can see the element in question if you should need help with that.

    Best regards,
    Rikard

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