-
AuthorPosts
-
January 22, 2019 at 10:37 pm #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!
January 22, 2019 at 10:48 pm #1057478Hey juliamadigan3,
Adjust the code to this:
#Homeslidermobile { display: none; } @media only screen and (min-width: 767px) { #Homeslidermobile { display: block !important; } }
Best regards,
Jordan ShannonJanuary 23, 2019 at 12:56 am #1057510Hi 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!
JuliaJanuary 23, 2019 at 1:14 am #1057513Hi,
Try:
#Homeslidermobile { display: none; } @media only screen and (max-width: 767px) { #Homeslidermobile { display: block !important; } }
Best regards,
Jordan ShannonJanuary 23, 2019 at 1:29 am #1057515Hi 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,
JuliaJanuary 23, 2019 at 9:14 am #1057633Hi,
Please provide admin info so we can log in and look into this issue further.
Best regards,
Jordan ShannonMay 4, 2021 at 7:55 am #1298191Is there an easy way to do this from the wordpress cms?
May 5, 2021 at 6:07 am #1298427 -
AuthorPosts
- You must be logged in to reply to this topic.