Search code examples
htmlcsspositionmaterializesidebar

How to place div bottom of window/Navbar HTML - materializecss


I am trying to place a div container at bottom of my NavBar that I created using materializecss but no matter what I try it does stick to the bottom. It either disappears from NavBar or goes to the top.

I tried

#bottomDiv{
    float: bottom;
}
#bottomDiv{
    position: relative; // absolute and fixed
    bottom: 0;
}

I searched online and every resource i come across it suggest to use bottom: 0 but it doesnt seem to work.

I tried creating a JSfiddle to show my code but I couldn't manage to get it work because it wouldn't import the materlizecss libraries - http://jsfiddle.net/jy6Lh7ct/8/

enter image description here

Any help would be nice, i have been searching and trying different possibilities but have had no luck - this is the link to the website i am following - https://materializecss.com/sidenav.html


Solution

  • You can make sure it sticks to the bottom with this

    #bottomDiv{
        position: absolute;
        bottom: 0;
        left: 0;
    }
    

    Fiddle example