How to create a fixed navbar inside a sidenav with Materializecss - materialize

I am using MaterializeCSS and would like to create a sidenav but with the navbar in it that is fixed so when content of sidenav is scrolled then the navbar remains at the top.
I have given this a go but with no luck. I can get a navbar inside the sidenav with no problem and following the instructions on the MaterializeCss site I am making it fixed but it still scrolls off the top of the page

Related

how to make toggle side bar using vue js with vuetify

How to create sidebar with toggle option.If i click icon sidebar should be visible left side of the page and the icon should be next sidebar. if i click icon again sidebar should be hide.Using vue js and vuetify
You should start by reading through the documentation for Vuetify.
The documentation provide an example of this under Pre-made Layouts.
Baseline layout with Navigation Drawer: https://vuetifyjs.com/en/examples/layouts/baseline

Bootstrap: navigation not fixed at the begin, and then fixed

i want to know if it's possible with bootstrap, to create the header with the logo and others informations, and then the navigation bar.
But the logo won't be fixe, only the navagation bar will be when it will be at the top of the page.
Here an example of header i'm trying to do with bootstrap
This partly depends on what you mean by "Header".
Often the "jumbotron" class is used as a header like this:
<div class="jumbotron"><img src='logo.png'>My Cool Company</div>
And the navigation bar is an independent element, specifically a navbar. It can be fixed on the page (scrolls with content) or Static on the screen (stays at the top or bottom)
Nabber example (always at the top):
<nav class="navbar navbar-fixed-top navbar-light bg-faded">
<a class="navbar-brand" href="#">Fixed top</a>
Link 1
Link 2
</nav>
You can find the other details on the Bootstrap page for Navbar:
Bootstrap Components navbar Placement
And the placement in this example is "navbar-fixed-top" so that it stays at the top of the screen, even when scrolling.
You may also want the navigation under the header, and want both to scroll until the navbar hits the top of the screen where it would then be fixed at the the top. This is sometimes called a sticky navbar. It can be done with jQuery, but at this time, I don't know of a way in Bootstrap without adding custom javascript.
Sticky Menu in jQuery - answer
If you do want the second option, without jQuery, ask another question on how to use Javascript switch from Fixed to Static when scrolling past the top of the screen.
thank you for your answer, but i think it s not my question, and i think my solution is not related to jumbotron.
if you look at the link i have give below, you can see that the logo of the site (w3school.com) is on the top when we are on the top of the page.
when we scrool down, this logo will disapear and only the nav bar (home, html, css, ...) will stay at the top.

bootstrap navbar margin-bottom doesn't work

When I inspect this example from bootstrap, I find that the margin-bottom in navbar does not separate the navbar and the container.
That's because the navbar is fixed positioned and when you specify some element to be positioned fixed or absolute you are removing that item from document flow hence no effect on subsequent container. Try removing position:fixed on inspect from nav and you will see margin bottom in effect.

nav doesnt work properly inside accordion

As you can see in the picture. The nav doesn't response on the screen size when I place inside the accordion.
I try to resized it using jQuery when the accordion collapse but it doesn't work also.
Does anyone have a solution to this problem?
IMAGE LINK

Fixed nav under a relative div

I have a relative div above a fixed one which acts like a navigation bar.
I want to be able to scroll past the relative div before the fixed div starts having to scroll here is my website.
as you can see from just scrolling on the site the sidebar doesn't work as intended.
Try using JavaScript to detect the scroll position of the window and then change the CSS to start scrolling like a fixed div.
Another tip, the the fixed div which contains your projects on the home page lays over your footer when you scroll to the bottom.
Use JavaScript to detect if the user is at the bottom of the page or not and then set the CSS of it to have a margin from the bottom of the page.
Hope I helped.