Canvas with absolute position doesn’t work as you can see here:
http://jsfiddle.net/733zs/1/ (Tested in Firefox and Chrome) The Rectangle should have a size of 500×500 pixel.
Is there a way to make it work, without setting width and height manually? Or do I have made any mistakes?
You must set width and height manually.
This can be done through JavaScript onresize event – which is fine because you almost always need to redraw your canvas surface onresize anyways.
EDIT:
From W3 spec, here is the canvas DOM interface:
http://www.w3.org/TR/html5/the-canvas-element.html