Consider this HTML and CSS code snippet:
#box {
width: 100px;
height: 100px;
overflow: hidden;
resize: both;
border: 1px solid black;
}
#content {
width: 100%;
height: 100%;
}
<div id="box">
<canvas id="content"></canvas>
</div>
When using the canvas element inside the box, I expected it to be resizable in Firefox, although it isn't in webkit-based browsers like Chrome and Opera. However, replacing the canvas with a div makes it work across all browsers. So my question is: why does using a canvas element prevent the outer div from being resizable in this scenario? And what are possible workarounds?