Offcanvas - scrolling after closing

@richards

The javascript will only work on a navbar with a offcanvas menu. If you have a navbar without a offcanvas menu some changes has to be done in the js file

Oh, I didn’t see that. Thank you.
I included everything, but I cannot make it work. The auto copyright is working, though. My BS version is 5.2. Is that the issue?

I greatly appreciate your help!

@Seb

It’s because the offcanvas doesn’t work good with your layout. If you don’t change the layout no script will make it to work as you expect it to work.

You can download the design again from the link that @richards provided you in his post above.
The bsdesign is a working example with your three pages

What’s wrong with the layout? And why does it impact whether an offcanvas works or not? In your example, which @richards shared, it works perfectly as I would like to hand it off to my friend. When I try to transfer the behavior to my design – I changed some things in the meantime - I cannot get the menu to behave like yours does.

I am trying to learn and understand what you did.

It’s nothing wrong with your layout, if you had made it with bootstrap 5.1 everything would have been working. It’s the current version bootstrap 5.2.3 that BSS using that is a little buggy.
It’s not just the offcanvas the scrollspy,toast and carousel has issues too.

In your case if you move the navbar out off the header and place the navbar just under the header. You have to make the navbar sticky at the top by adding the class sticky-top to the navbar.

The offcanvas you can move to just under the footer
On your back to top button remove the onlick="topFunction()"

BTW you have a footer tag in your footer why?

1 Like

Sorry for not getting back to you sooner. Thank you for clarifying the bootstrap version issue. Everything is working not after following your steps, thank you! I do not fully understand why it works, but it does :slight_smile:

Oh, thanks for the heads-up with the double footer tag. I think I added a premade section into my blueprint.