Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a sticky footer inside the LeftNav?

Tags:

material-ui

I'm trying to create a sticky footer inside the <LeftNav> component, so far unsuccessfully. This is what is needs to look like:

enter image description here

I have tried using position: fixed; bottom: 0 and position: absolute; bottom: 0 on the wrapper of the search field, but when the user scrolls the list items the search field travels up. Like this:

enter image description here

Any idea how to fix this?

like image 799
picardo Avatar asked Oct 31 '22 08:10

picardo


1 Answers

Position: fixed should work. Without more information about how you have your page setup, it's hard to be more specific. Take a look at this fiddle and see if that helps:

https://jsfiddle.net/kevinlrak/r1mpf1n8/

#search {
  position: fixed;
  background-color: red;
  bottom: 0;
  width: 25%;
}
like image 127
Kevin Rak Avatar answered Nov 08 '22 15:11

Kevin Rak