As the title says im trying to work with canvas but whenever i try to set its height and width to 100% height and width of the page it just overflows by a tiny bit. I have no clue why its happening and its very annoying when trying to make something.
Does anyone have a clue as to why it is happening?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas Practice</title>
<style type="text/css">
canvas{
height: 100%;
width: 100%;
}
html,body
{
margin: 0;
height: 100%;
}
</style>
</head>
<body>
<canvas></canvas>
<script type="text/javascript" src="canvas.js"></script>
</body>
</html>
This is my html with some basic inline css.