Mam problem z szerokością <canvas>, oto mój kod:
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8"></meta>
<title>Gra</title>
<script type="text/javascript">
window.onload=function()
{
var c=document.getElementById("canvas");
var obj=c.getContext("2d");
obj.fillStyle="#000000";
obj.fillRect(0,0,100,100);
}
</script>
</head>
<body>
<canvas id="canvas" height="600px" weight="600px"><p>Problem z canvas</p></canvas>
</body>
</html>
Wygląda to tak: