Force scrollbar


/ Published in: CSS
Save to your folder(s)

Sometimes, pages can be shorter than the browser view-port, and when you load a page on the same site that has longer content and uses a scrollbar, content can jump side to side. By forcing a scrollbar no matter the height of our content, we stop this small, but annoying issue.


Copy this code and paste it in your HTML
  1. html { overflow-y: scroll; }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.