Are you trying to resize the canvas to full page size?
Your max-width is only used to define a theoretical maximum width of the canvas, not to cause the canvas to be resized.
Anyway...
Don't use CSS to resize the canvas because your canvas drawings will be distorted. That's because the browser responds to a css canvas resizing by "stretching" the existing canvas pixels.
Instead, resize in javascript by setting the width of the canvas element itself.
var canvas = document.getElementById('myCanvas'),
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;