I realized that this was due to the appearance of a scroll bar. But how to fix, I can not think of. https://codepen.io/Anton-forntend/pen/zaRbYq/ введите сюда код

  • in which browser is this observed? - user33274
  • Click on the link and you will understand. This is not a bug in the browser - Anton Fedorov
  • I looked - and did not see what you wrote - user33274

1 answer 1

You need to set the menu coordinates from the left side of the screen. But it is necessary to set explicitly in pixels, and we can receive this value only by the script.

 mainMenu.style.left = document.body.clientWidth + 'px'; 

https://codepen.io/anon/pen/KeoPOL