There seems to be a few threads on this already, however anything I try based on any comments does not seem to work.
Issue: I have a main nav using the ‘nav items’ module. Some of the elements I wish to display on mobile but not desktop. I set those elements to display:none for desk top, they disappear however still take up space in the DOM and throw off the nav styling/spacing.
I have tried wrapping the elements in a DIV and setting the div to display:none, but whatever I try the li items remain, take up space and break the desktop menu.
Any help appreciated. This seems a silly issue to be having. Matt
I tried again, this time putting the CSS in the element’s Custom CSS area, and well I never it works!
I was previously trying at page level, with the intention to carry across to global once working. All I can think of is that I was not getting the selector correct. I will try again to carry across to global at some point.
Hi Matt,
Thanks so much for your report, and thanks to André for providing the solution.
I’m not exactly sure which thread(s) you’re referring to, but this one seems like a good candidate—it also offers a possible solution:
That’s the right approach. If you place it somewhere else, you may need to adjust the selector again, since %root% would then likely refer to a completely different element.
Overall, this isn’t a bug. It might be a potential improvement—we’ll have to see.