Fullscreen HTML Element using window.innerHeight/Width different with DOCTYPE
- by CryptoQuick
I'm trying to make an HTML5 canvas element fullscreen with the window.innerHeight and innerWidth properties.
Unfortunately, on Chrome 10, when I set use the following doctype:
<!DOCTYPE HTML>
...there is some extra scrolling space indicated by scroll bars which shouldn't appear.
Without a doctype, everything is fine.
The element is an HTML5 canvas, so styling with 100% will only stretch the content.
Is it worth using a doctype which breaks my functionality (without which might be bad?), or should I subtract, say, 15px from the values in order to keep scroll bars from appearing? (which is kludgy)