- This topic has 15 replies, 4 voices, and was last updated 1 year, 5 months ago by
Ying.
-
AuthorPosts
-
January 7, 2021 at 7:02 am #1609634
Caitriona
Hi, I am trying to hide my e-mail registration form on mobile and I am wondering what CSS I need to add to do this. This e-mail form actually comes from a plugin and I use shortcode to display it on my site.
January 7, 2021 at 8:11 am #1609733David
StaffCustomer SupportHi there,
you can add this CSS:
@media(max-width: 768px) { .snp-pop-inline { display: none; } }
I noticed on your site that you have this in your Child Theme Style sheet:
add_action( 'wp_enqueue_scripts', function() { wp_dequeue_style( 'generate-child' ); }, 50 );
That should go in your child theme functions.php NOT the style sheet.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 12, 2021 at 1:04 pm #1616267Caitriona
Hi, thank you for noticing this error. I fixed it.
I tried adding that as additional CSS but it still shows up on mobile. What do you think?
January 12, 2021 at 2:52 pm #1616334Leo
StaffCustomer SupportDavid’s CSS should work.
Can you clear and disable your caching plugin first?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 13, 2021 at 6:22 am #1616941Caitriona
It’s still not working. I am not sure why. Actually I never disabled my cache plugin yet. It’s Litespeed cache but I don’t want to lose the settings on it.
January 13, 2021 at 6:25 am #1616950Caitriona
I’ll look around and see if there is a setting that may be causing the problem
January 13, 2021 at 7:06 am #1617227David
StaffCustomer SupportTry moving the CSS i provided to the very top of Additional CSS code.
And temporarily disable the cache, and clear browser caches to see if its working.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 13, 2021 at 7:11 am #1617237Caitriona
I tried moving it to the top and it worked! Wow– weird hack! Thank you!
January 13, 2021 at 7:19 am #1617245David
StaffCustomer SupportThat generally means that there is some ‘broken’ CSS in there.
Looks like you have a missing closing}
on the very first @media query you have.Look for this CSS which is the very end of first media query and the start of the next – i have commented where the missing
}
should go:.wplogout-social-sharing { font-size: 17px; padding: 7px 20px; } } /* missing bracket goes here */ @media only screen and (max-width: 600px) { .wplogout-social-sharing { font-size: 17px;
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 13, 2021 at 7:34 am #1617262Caitriona
That’s perfect. Fixed. Thank you for all the help!!
January 13, 2021 at 7:45 am #1617276David
StaffCustomer SupportGlad to be of help!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 14, 2021 at 10:51 am #1658102Caitriona
Hello, I just wanted to add another question. While this worked 100%, I added another email registration form in the right sidebar which I actually want to show up on mobile. How do I edit the CSS? Thank you for your help!
February 14, 2021 at 2:02 pm #1658236Leo
StaffCustomer SupportCan you link us to the page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 14, 2021 at 2:03 pm #1658239Ying
StaffCustomer SupportHi ,
You could modify the CSS to this:
@media(max-width: 768px) { .snp-pop-inline:not(.snp-pop-715) { display: none; } }
Let me know 🙂
February 15, 2021 at 2:16 am #1658643Caitriona
Thank you! It works. Unfortunately, it doesn’t seem to be compatible on mobile at all. Might need to try something else.
-
AuthorPosts
- You must be logged in to reply to this topic.