Sticky top div with absolute positioning

后端 未结 6 1525
温柔的废话
温柔的废话 2020-12-30 00:48

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

6条回答
  •  [愿得一人]
    2020-12-30 01:38

    I chose to go with a JavaScript approach after all. Would have preferred a pure CSS approach but my need for IE8 support stood in the way. This answer by Myles Gray is pretty much what I did - https://stackoverflow.com/a/4933509/940517

提交回复
热议问题