I am having a lot of confusion trying to figure out what is happening. I am drawing some boxes in using javaScript. I am following this guide to recreate breakout.
The trouble that I am having is that the canvas size does not work if I am using external css to set the width heigth like so below, the css doesnt work.
#myCanvas{
width: "480";
height: "320";
}
However if I change the code to in my html to this
<canvas id = "myCanvas" width ="480" height="320">
</canvas>
The box is the right size. Why cant I set the height and width out of the html?
Here is a JSfiddle of the box with the right size.
If you move the css width/height over to the external side it doesn't work anymore. What gives?