I'm trying to use <canvas>
in iPhone Safari, and if I place the element in the body, there are unused pixels to the left and top of the element. I tried specifying margin:0;padding:0
with CSS to no avail.
What's going on here?
<html>
<head>
$(document).ready(function()
{
$('#screen').attr("height", $(window).height() );
$('#screen').attr("width", $(window).width() );
//prevent scrolling
$(document).bind('touchstart touchmove', function(e)
{
e.preventDefault();
});
});
</script>
</head>
<body>
<canvas id = "screen">
</canvas>
</body>
</html>