-1

In http://onlyabutton.com/, when you press the left and right arrow keys, the window shakes a bit, most likely because of canvas dimensions. How do I fix this? Help would be appreciated!

  • Doesn't only part of the canvas "shake"? I think it is a bug, not a canvas size issue. – Paul Draper Nov 09 '13 at 06:03
  • I beleive the size of the canvas is not loading according to the browser size.. you need to make sure loading the canvas asper the user browser size.. http://stackoverflow.com/questions/1664785/html5-canvas-resize-to-fit-window this would help you in doing so.. check the answers... – sam Nov 09 '13 at 06:05

1 Answers1

3

You just have to add:

html, body {
    margin: 0;
}

You set the canvas width to 100% of the window size but forget to subtract the margin of body.

Alexander Scholz
  • 2,100
  • 1
  • 20
  • 35