Stop scrollbar from pushing content left

后端 未结 3 2118
一整个雨季
一整个雨季 2021-02-19 01:24

I\'m designing a website and I have multiple pages that use the same template, some pages are longer than the browser window\'s height, other\'s aren\'t. The ones that are longe

相关标签:
3条回答
  • 2021-02-19 01:54

    The only way to do this is to have the scrollbar always visible.

    html { overflow-y: scroll; }
    
    0 讨论(0)
  • 2021-02-19 02:01

    Give overflow value as overlay. This will avoid the recalculation of layout when scrollbar appears

    0 讨论(0)
  • 2021-02-19 02:02

    Overflow: overlay worked for me. Would've commented on jintoppy's post but I'm a nooob

    0 讨论(0)
提交回复
热议问题