Displayed below is the image depicting my problem:
I have discovered a cumbersome method to eliminate this unwanted whitespace by treating it as four separate lists and utilizing a complex for-loop to add elements. However, this approach limits the number of columns to four, resulting in poor aesthetics when adjusting the browser window size. I believe there must be a simpler CSS solution for this issue, but I have not been able to identify it yet. Any suggestions or bright ideas?