Site logo

Archived topic

off canvas width and height changes

13 replies · Started by Streater on June 30, 2021

Viewing posts 1–14 of 14

I was able to get the default mobile menu looking as good as I could with customizations... but it seemed like the off canvas menu was going to solve issues with scrolling on a phone. So I switched.

I really like the off canvas and it solves the scrolling issues... BUT I ran into new issues which I don't see anyone else having in the forums:

I'm trying to get it to be fullwidth... I was able to get it with the inspect element tool but this doesn't work in practice:

#generate-slideout-menu .main-navigation .slideout-navigation .offside--left .is-open"{
    width: 100vw;
}

I also want to see my top navigation bar (not have the menu cover it up) and use my original X out (where the hamburger is positioned) but I assume those should be separate topics.

Overlay doesn't have the slide effect though right? I do like that feature.

I did try this code below which makes it appear full width but my menu links have a hover background color change which isn't full width... so the menu appears to be fullwidth but it really isn't.

'
.offside-js--is-open .slideout-overlay {
background-color: #fff
}
'
FYI I did figure out how to solve the issue (that I thought should be a separate topic) with the navigation bar with the z-index.

Tried it and it isn't working for me... David says that Fullscreen was going to be added to a new version... looks like he said that 2 years ago... was that added?

So the menu works perfect with that... but when the menu is supposed to be closed (like when you first go to the site or you exit out of the menu) the menu background is still there but without the links and is pushing page content to the side. Any ideas? (link below in private info to site)

Hi there,

i replied to your other topic. If we can keep it to that topic i will provide some alternative CSS.

Removed it... thanks!

Glad to hear :)

Try this CSS to make it fill the viewport:

#generate-slideout-menu.main-navigation.offside {
    width: 100%;
}
#generate-slideout-menu.main-navigation.offside--left {
    left: -100%;
}
#generate-slideout-menu.main-navigation.offside--left.is-open {
    transform: translate3d(100%,0,0);
}

You will need to adjust your CSS that is adjusting its Top position ie.

@media only screen and (max-width: 768px) {
    #generate-slideout-menu {
        top: 40px!important;
        z-index: 0!important;
    }
}

The Mobile header is 80px tall.

Wow it's perfect now! Thank you so much!

Side note on that Top position... 80px does fix that... but I noticed the Wordpress admin bar effects the menu position not that it matters because it looks good to the User. BUT when viewed on an iPhone and the menu is opened, and a User is scrolling up, they can drag the admin bar down over the menu which looks weird... I mean only if they are really playing around with it. It seems like the menu and the bar have different position attributes?

You can add a separate CSS rule to adjust the Off Canvas position when the admin bar is present:

.admin-bar #generate-slideout-menu {
    top: 112px!important;
}

Adjust the Top value to suit.

This archived topic is closed to new replies.