How can I have a position: fixed; behaviour for a flexbox sized element?

前端 未结 5 1659
醉梦人生
醉梦人生 2020-12-02 10:09

I have a div called .side-el which I would like to have in a position: fixed; behavior, but as soon as I apply position fixed the width alternates from the right one. The ri

5条回答
  •  庸人自扰
    2020-12-02 10:51

    A far simpler solution would be to use overflow-y:scroll and height: 100vh on the main-el container. This will give the appearance of fixed position to the side-el container without resorting to position: fixed.

提交回复
热议问题