0

I have a simple html layout, nothing but a blank html page with a navigation bar. When I add items such that they exceed the browser's height and appear beneath the window (and the scrollbar appears), the page will shift slightly to the left (the entire page). As you can imagine, this makes it jarring to navigate using the navigation bar because the page keeps changing positions. Why is this happening?

nachime
  • 1,826
  • 4
  • 16
  • 25
  • The scrollbar takes up space. – John Conde Jul 24 '14 at 20:50
  • Using a margin-right:10px or so for the might help here. I think (at least on some browsers) that the scrollbar will happily be considered as part of the margin – manuBriot Jul 24 '14 at 20:53
  • oh my god, I never thought that the scrollbar would take up space. However margin-right:10px did not solve the problem. Is there any other option? EDIT: using overflow-y:scroll; for html worked, but I still don't know why this solution works – nachime Jul 24 '14 at 20:57

0 Answers0