I’m trying to figure out how to create a dynamic cuptree like the image below:

If its static, that means I know how many boxes there are in the first column I can just calculate the next column by pixels and so on… But, if the first column is dynamic I need another way to aproach it! Should it be by divs or tables… How do I figure this out…

What do you mean by “dynamic”? Will the boxes always form a pattern of 16>8>4>2>1, or will you sometimes have more than 2 boxes going into 1?

The easiest way I can think of to do this is with a table - it may not be the ideal solution but I don’t think it’s too bad. Use rowspans to make the cells after the first column the right height, and within each cell, have a <div> with a specified size (assuming that’s appropriate), centred vertically.