I have a table representing the coordinates.

How can I resize dynamically, so it is always suitable for the parent div (width: 100%), like an image?
I am currently using @media queries that are hard-coded. But there must be a better way.
.hitbox { width: 25%; } @media (min-width: 702px) and (max-width: 800px) { .hitbox .tablewrapper { font-size: 9px; } } @media (min-width: 800px) and (max-width: 840px) { .hitbox .tablewrapper { font-size: 10px; } } @media (min-width: 840px) and (max-width: 915px) { .hitbox .tablewrapper { font-size: 11px; } }
edit:
The problem is if the table should be even smaller than text containing a fixed text size.
Jsfiddle
This works great.
But less than that, He does not work.
This should make the font smaller, or at least cut the cells.
edit 2: The whole table should be visible all the time, it is not important to read the text, but to see the template (with gray or red color) that it creates.
source share