Hide Site Title for Mobile
-
Hello,
I would like to hide the site title and navigation in the mobile layout.
The code I am using in the "custom css for desktop version" works as expected.
The same code used in the "custom css for mobile version" successfully hides the navigation but not the site title. Could you please help me with this?
Link to example page: http://sebastianpetrovski.com/mands
Code pasted below....
/* mands /
/ site title /
body.slug-mands .sitetitle.txt .sitetitle-txt-inner span{
display: none;
}
/ navigation */
body.slug-mands nav.primary a{
display: none;
} -
Hi @sebastianpetrov
try to add this to your custom CSS mobile section:.mobile-title, .navbar, .burger { display: none !important; }
I hope that works!
Many wishes!
Marius
-
Hi @mariusjopen
Thank you! It works, I would like to target specific pages - how can I do this?
For example my info page has the slug "info" but if I prepend ".slug-info," to the code it still applies "display: none" site wide.
Best,
Sebastian
-
you need to put it in front of every line:
.slug-XXX .mobile-title, .slug-XXX .navbar, .slug-XXX .burger { display: none !important; }
Let me know if that worked out!
Best!
Marius
-
Hi @mariusjopen
Thank you - perfect!
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it