I saw a post with negatives that happened to a user who couldn't make a fixed side menu on the left and it was removed but I understood his code.
If you see it or for future users who have problems with fixed side menus, I leave a very simple basic code that can be used to start making a side menu, and if you tweak it an footer
or navbar top
. This makes use ofposition: fixed;
With this it is possible to have a side menu which will remain fixed all the time to the left. In this case, even if you scroll down, the menu will remain in the same place. This can be seen on the Youtube website .
It is basic, it could be improved and/or done
responsive
. I hope this contribution can help.Data:
1em
=16px
of normal. It may vary in certain cases. if for a CSS selector we have specified afont-size
of16px
, then1em
=16px