-
daveporter
On this page below I have placed a button (in a container) on the navigation using an Element
I want it to only appear on desktop, I’m hiding it on Tablet / Tablet & Mobile & Mobile, but because the header/menu is wide (1280 breakpoint) it is still apperaing on some tablet sizes -not sure the best way to handle this…
TIA, Dave
-
George
Hi Dave,
The button’s still showing on those larger tablet sizes because GenerateBlocks’ responsive visibility toggles use their own fixed breakpoints, which don’t line up with your navigation’s Mobile Menu Breakpoint (1280px). So in the gap between roughly 1024px and 1280px, the mobile menu has already kicked in but the “hide on tablet” rule has stopped applying — and the button reappears.
The cleanest fix is to tie the button’s visibility directly to your menu breakpoint with some custom CSS rather than the block toggles. Turn off the responsive visibility toggles on the container, then add this (Appearance → Customize → Additional CSS):
@media (max-width: 1280px) { .gb-element-261666e3 { display: none; } }That targets the button’s container directly, so it’ll hide everywhere below your menu breakpoint and show on desktop only.
One thing to check: make sure the 1280px matches your actual Mobile Menu Breakpoint value (Customize → Layout → Primary Navigation → Mobile Menu Breakpoint). If you’ve changed it from the default, update the number in the CSS to match exactly.
-
daveporter
Thanks George, all good!
Dave -
George
Glad to know Dave, you are welcome!
- You must be logged in to reply to this topic.