Take the tour ×  I made a game that sets the width and height of
the canvas as window.innerWidth and window.innerHeight,
respectively. In theory, this should make it flush with the
sides, yet I get scrollbars and a 4 pixel height blank to the
bottom of the page. I set the margins and paddings to * as 0,
thinking that would solve it, yet it's still like that.  I need
to use the least amount of code as possible; this is for a
future js1k compo.  Here's a screenie of the page Top-Left
Scrolled Image, Bottom-Right Scrolled Image.  Any ideas on what
is wrong or on how to fix it?  share|improve this question I had
the doctype as <!DOCTYPE html>, but I added the 5 to the end of
html, and now it's all fine :D –  Tgwizman May 9 '12 at 2:48 add
comment  1 Answer  up vote 2 down vote accepted  You're missing
a display: block for your canvas element, or a <!DOCTYPE html> -
they're inline by default unless you're in html5 mode.
share|improve this answer I was testing my game in chrome, so
this shouldn't be the problem. I