Currently, I am tackling the JS/jQuery Project for The Odin Project and I am confident that my solution is working exceptionally well.
However, the issue I am facing is that when dealing with larger amounts of elements (around 40-45 in JSFiddle and 50-52 in my Chrome Browser per line), there seems to be a vertical gap between the elements on two consecutive rows. Initially, I tried setting vertical-align: top
to eliminate these gaps, which did work up until the mentioned number of elements per row.
You can view the JSFiddle example here.
If you increase the number of elements per row in the JS file (to at least 50), you will observe the issue I am describing.
This behavior is not what I desire. My goal is to have a seamless grid without any gaps between the cells. Can anyone shed light on why vertical-align: top
breaks?
Edit: Upon reflection, I believe the problem might be linked to the percentage-based width/height, as it also malfunctions with numbers below 40 due to complex fractions being the result of division.