-
Hi. What's the best way to make the sidebar fixed? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Please explain. |
Beta Was this translation helpful? Give feedback.
-
@LITUATUI, in my experience, if the sidebar is taller than the screen height, making it sticky works but not smoothly. There's no knob on the config to enable that. It's not that hard to implement though. I brought up the issue of the sidebar height because in most cases, the sidebar will be taller than the client's height. In which case it would be much better to make part of the sidebar sticky. For demo purposes, I will a recording of a site that uses this theme with its sidebar being sticky. Screen.Recording.2022-03-25.at.18.28.16.movIf you insist on having the entire sidebar being sticky, these are the styles you should add to your custom CSS file // assets/sass/_custom.sass
.sidebar
&_inner
position: sticky
position: -webkit-sticky
top: 60px |
Beta Was this translation helpful? Give feedback.
@LITUATUI, in my experience, if the sidebar is taller than the screen height, making it sticky works but not smoothly. There's no knob on the config to enable that. It's not that hard to implement though.
I brought up the issue of the sidebar height because in most cases, the sidebar will be taller than the client's height. In which case it would be much better to make part of the sidebar sticky.
For demo purposes, I will a recording of a site that uses this theme with its sidebar being sticky.
Screen.Recording.2022-03-25.at.18.28.16.mov
If you insist on having the entire sidebar being sticky, these are the styles you should add to your custom CSS file