Scrolling only content div, others should be fixed

后端 未结 7 1308
广开言路
广开言路 2020-12-17 08:15

I have three divs. I need header and left_side divs to be fixed and content div to scroll. I\'ve been searching for solution and found something with overflow and <

7条回答
  •  感情败类
    2020-12-17 09:10

    position: sticky on the element, that should stay in place when scrolling, worked for me in a similar situation. https://www.w3schools.com/css/tryit.asp?filename=trycss_position_sticky

    position: sticky;
    top: 0px;
    

提交回复
热议问题