Div at bottom of window and adaptable height div

前端 未结 6 723
半阙折子戏
半阙折子戏 2021-01-03 05:00

Is there a way to get a div to always be at the bottom of the window, and another div to change its height to fill any space that it leaves, and that div will scroll if its

6条回答
  •  没有蜡笔的小新
    2021-01-03 05:37

    try this: set the orange div position relative with a bottom margin = height of the green div with an overflow: auto

    I think your orange div will then scroll if it becomes larger then the space between the white and green div. to solve your background problem, you can easily set orange as background color. In that way, it will never be visible for a user that your orange div is in fact smaller as the space between the white and green divs

提交回复
热议问题