I\'m using absolute positioning to have a div fill up the entire browser window. However, I wan\'t to combine this with a sticky div that sometimes is there and sometimes no
2018-6-18
I choose the CSS way with position: sticky
.
that https://github.com/abouolia/sticky-sidebar .
doesn't work for me (I am using Vue.js 2.0 SPA with vue-router & vuex)
I also want the element position: absolute
first,
and then position: sticky
position: absolute
to have the right position.(don't forget to set height
for parent. for example height:100%
)
position: sticky
work for me.