Flex Layout with fixed position (no scrolling) sidebar

前端 未结 3 844
不知归路
不知归路 2021-02-07 10:51

I have a layout with left and right canvas sidebars, enclosing the Main content area in the middle.

The sidebars and main content are flex items, positioned in a flex la

3条回答
  •  感情败类
    2021-02-07 11:32

    The question is old, but I solved a similar issue using

    position: sticky;
    top: 0;
    

    for the left and right items. Also I removed the

    display: flex 
    

    css for the flex items, I don't think that's necessary.

    https://jsfiddle.net/8mpxev0u/

提交回复
热议问题