hi
I want my navbar to switch to the mobile view when the screen size hits 979px, but with the logo remaining on the left where it is and the hamburger menu sitting in the centre and the button still on the right.
I found the following code in a post to enable the hamburger menu, but it did not work for my site.
@media only screen and (max-width:979px){
.x-nav-wrap.desktop {
display: none;
}
.x-btn-navbar {
display: block;
float: right;
}
.x-nav-wrap.mobile.in,
.x-nav-wrap.mobile.collapsing {
display: block;
}
body.x-navbar-fixed-top-active .x-navbar-wrap {
height: auto;
}
.x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right {
position: relative;
top: 0;
}
}
None of the selectors in the above did anything for the navbar, so I checked Google Dev and used .x-bar
, .x-bar-is-sticky
or .x-bar-h
alternatively, but they simply removed the entire navbar altogether, so no good there. I then tried .x-bar-menu
and this did what I wanted in removing just the 4 menu items, so that part solved. Now how to have the hamburger menu appear in the centre of the navbar?
cheers