I have a larger program I've been working on that has multiple elements within a div, including a canvas. The div's border always seems to extend over the size of its children, I've simplified the code here, and am wondering if anyone has a solution.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gap Test</title>
</head>
<body>
<div id="d">
<canvas id="c" height="400" width="600"></canvas>
</div>
</body>
<style>
#d {
border: 3px solid black;
}
#c {
background: blue;
}
</style>
</html>