Set div to remaining height using CSS with unknown height divs above and below

前端 未结 4 1196
死守一世寂寞
死守一世寂寞 2020-12-04 13:11

Is it possible to make the wrapper fill the window height (no scrolling) and the center div scrollable without messing around with pixels and javascript?

<         


        
4条回答
  •  清歌不尽
    2020-12-04 13:50

    So what you are talking about is a sticky footer. I went and did some more research and here is what I have for you.

    high content

    This will give you a sticky footer. The key is position:fixed and bottom:0px; Unfortunately this means it also hovers above any content in the scrollview. So far there seems to be only Javascript to figure this out but I will keep looking.

提交回复
热议问题