Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue
[Please describe this bug in as much detail as possible so we can replicate & debug this bug]
Dear Bricks Builder Team,
My header menu consists of logo, nav nestable and share icon. Nav nestable contains 7 nav link items and 1 dropdown. Dropdown contains 4 nav link items. For mobile breakpoint, I want to show the menu items text left aligned with some padding and the dropdown icon right aligned with some padding. Dropdown icon when expanded should have similar alignment like the main items ( Currently it is almost working, although the dropdown menu text is showing right aligned, better to show it left aligned ). My concern is when toggle open, I am not able to hide the hamburger icon. Second is in mobile landscape, in toggle open page, scrolling is not working .
Structure
Section
Container
Block
Logo
Nav Nestable
Nav Items
Nav Link
Nav Link
Nav Link
Nav Link
Nav Link
Nav Link
Nav Link
Dropdown
Content
Nav Link
Nav Link
Nav Link
Nav Link
Toggle (Close Mobile)
Toggle ( Open Mobile)
Icon
Bricks Builder → Settings → CSS code
First trial
/* mobile menu panel only */
@media (max-width: 991px) {
.mobile-header-nav .bricks-mobile-menu-wrapper {
overflow-y: auto;
max-height: calc(100dvh - 80px); /* keep below header; use safe dynamic viewport */
-webkit-overflow-scrolling: touch;
padding-top: 80px; /* keeps menu below header */
z-index: 999;
}
/* layout of menu items */
.mobile-header-nav .bricks-mobile-menu-wrapper .brx-nav-nested-items {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0;
width: 100%;
}
.mobile-header-nav .brx-nav-nested-items > li { width: 100%; margin-left: 3rem; }
.mobile-header-nav .bricks-mobile-menu-wrapper .menu-item > a {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
padding: 14px 24px;
text-align: left;
}
.mobile-header-nav .menu-item-has-children { position: relative; }
.mobile-header-nav .brx-submenu-toggle {
position: absolute;
right: 24px;
top: 50%;
transform: translateY(-50%);
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
.mobile-header-nav .sub-menu {
display: block;
width: 100%;
padding: 6px 0 10px 0;
margin: 0;
}
.mobile-header-nav .sub-menu a { display: block; padding: 12px 24px 12px 42px; text-align: left; }
/* keep header above menu */
header, .brxe-header { z-index: 9999; }
}
2nd trial
@media (max-width: 991px) {
/* =========================================
MOBILE MENU PANEL ONLY
========================================= */
/* Offcanvas menu wrapper */
.mobile-header-nav .bricks-mobile-menu-wrapper {
overflow-y: auto;
max-height: 100vh;
-webkit-overflow-scrolling: touch;
padding-top: 80px; /* keeps menu below header */
}
/* Main UL */
.mobile-header-nav .bricks-mobile-menu-wrapper .brx-nav-nested-items {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0; /* remove 2rem spacing */
width: 100%;
}
/* Main menu LI */
.mobile-header-nav .brx-nav-nested-items > li {
width: 100%;
margin-left: 3rem;
}
/* Main links */
.mobile-header-nav .bricks-mobile-menu-wrapper .menu-item > a {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
padding: 14px 24px;
text-align: left;
}
/* Dropdown parent item */
.mobile-header-nav .menu-item-has-children {
position: relative;
}
/* Dropdown toggle icon */
.mobile-header-nav .brx-submenu-toggle {
position: absolute;
right: 24px;
top: 50%;
transform: translateY(-50%);
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
/* Submenu wrapper */
.mobile-header-nav .sub-menu {
display: block;
width: 100%;
padding: 6px 0 10px 0;
margin: 0;
}
/* Submenu links */
.mobile-header-nav .sub-menu a {
display: block;
padding: 12px 24px 12px 42px;
text-align: left;
}
/* Fix landscape scrolling */
.mobile-header-nav .bricks-mobile-menu-wrapper {
height: 100vh;
}
/* IMPORTANT:
keep header visible above menu */
header,
.brxe-header {
z-index: 9999;
}
/* Menu panel below header */
.mobile-header-nav .bricks-mobile-menu-wrapper {
z-index: 999;
}
}
For hiding tried this code, didn’t work
.brx-open .bricks-mobile-menu-toggle { display: none !important; }
or
.show-mobile-menu .bricks-mobile-menu-toggle { display: none !important; }
or
.bricks-mobile-menu-toggle\[aria-expanded=“true”\] { display: none !important; }
Browser: Chrome 110
OS: Windows
URL: Link to a page that illustrates this issue
Video: Jam
Best Regards,
D. Mallick