I got full width in a <div> object, but now, the same style ( in the style attribute ) , doesn't work in a <canvas> object. How to fix it so that the right will have -8px away from the right side. So, how to do that?
<div>
style
<canvas>
You can use javascript to resize your canvas without losing quality when using css.
var canvas = document.getElementById("canvasID"); canvas.width = window.innerWidth - 8 // subtracts 8px from the width canvas.height = window.innerHeight;
Then you can use CSS to remove the margin & padding.
body { margin: 0 !important; padding: 0 !important; }
[email protected] Y0U F0R H3LP
How to do full width in <canvas> element?
I got full width in a
<div>
object, but now, the same style ( in thestyle
attribute ) , doesn't work in a<canvas>
object. How to fix it so that the right will have -8px away from the right side. So, how to do that?You can use javascript to resize your canvas without losing quality when using css.
Then you can use CSS to remove the margin & padding.
[email protected] Y0U F0R H3LP