Trying to design fluid and flexible "tiles" for a website, which should expand across 100% of the browser viewport. The goal is for them to adjust in size if necessary to fill any white space gaps left by unfitted tiles.
Using a standard div tag with a min-width and min-height of 200px, set to "display: inline-block," solves most of the issue. As the browser window widens, the tiles will stack up on the top line if there's room for another.
The challenge arises when there's no space for the next tile, resulting in whitespace on the right side. In such cases, I want each tile to 'scale up' to occupy the full width of the line.
For example, if the browser width is 675px, instead of having three 200px-wide tiles, they would resize to 225px each. If you then resize the browser to 800px, there would be four 200px-wide tiles.
I aim to replicate the layout displayed on . Consequently, I'm seeking a CSS-only solution, although I suspect utilizing some JavaScript may be necessary, particularly for handling window resizing. Any suggestions?