Stop scrollbar from pushing content left

后端 未结 3 1718
陌清茗
陌清茗 2021-02-19 01:30

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:58

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

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

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

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

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

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