Archived topic
Hide a certain section in mobile
13 replies · Started by Leo on August 2, 2016
Hi Tom,
Is there a way to hide a certain section on mobile? I have a section with a slider on it and it looks terrible on mobile so I would like to hide that section all together.
Thanks!
....is this it?
@media (max-width: 768px) {
.hide-on-mobile,
#generate-section-3 {
display: none;
}
}
Hi Leo,
Not quite.
All you need to do is give your section a custom class (using the Custom Classes field) of: hide-on-mobile
GP has these classes built in:
hide-on-mobile
hide-on-tablet
hide-on-desktop
You might need to give it both of the mobile and tablet classes if you only want to show it on desktop.
Hope this helps :)
ahh so simple. Thanks!
No problem :)
Nice. That is easy. Thanks!
Hi guys, just a question re hiding a section. When I apply the custom classes
hide-on-mobile
hide-on-tablet
hide-on-desktop
the section is hidden, however its padding seems to still be there, as there is now a bigger space between the section before and after the hidden section?
Can you link me to the page? Thanks!
https://workingsheepdogtraining.com
You'll see there is a thicker gap between the 1st and 2nd sections, this is were I have disabled the section.
That looks like the 3rd section which doesn't have any of those classes added:
https://s10.postimg.org/40ba16hyh/section.png
You can see section 6 does for example.
Thanks Leo
No problem!
this does not seem to work for me.
i did enter hide-on-mobile under the custom class for the section i am trying to keep hidden. However it continues to show!
pls help
Can you open a new topic and link us to the page in question?