I'm trying to use HTML to make a simple matrix visualization for computer vision. I'm representing the image as a TABLE and each pixel as a TD of 16x16px. The code is straightforward:
<!doctype html>
<html lang="en">
<head>
<style>
td {
width: 16px;
height: 16px;
}
</style>
</head>
<body>
<table>
<tr>
<td>0.1</td>
(800 more cells)
</tr>
(600 more rows)
</table>
</body>
</html>
Of course I end up with millions of cells. I don't care about memory requirements as long as the cells are rendered as squares.
However, in Chrome for some reason the tds are ignoring the fixed with and height provided and instead fit their contents.
Any idea how to make the cells respect the size provided?
Why this is not a duplicate: This problem only happens when the browser has to render millions of DOM nodes in a layout that's much wider than the screen. It affects both height and width and the reason probably relates to browser rendering systems.