New to web development, I have a design dilemma. Working on a game that teaches students how to multiply, I am unsure about the best way to display the multiplication process. This picture illustrates my issue: https://i.sstatic.net/F8ZGs.png
Given that I don't know in advance how many input cells (white boxes) or carry digits (red boxes) will be needed, I'm stuck on how to proceed.
In Django, I attempted to create a grid of all potential boxes for the calculation and set display flags for those required. However, this approach didn't feel quite right to me. Is there a simpler solution? Would using css-grid be more appropriate for handling this type of problem? Perhaps passing all boxes to the view and letting CSS do the rest could work seamlessly.
Thank you for any advice!