I am currently designing a layout to showcase content blocks side by side in a manner that fills the browser window with DIV blocks.
I recall stumbling upon a CSS-only technique that automatically adjusts the width of each DIV based on the size of the browser window. When there is enough space available, 3 DIVs are displayed per row; however, if the window is narrowed, it switches to 2 DIVs per row, shifting the third down while maintaining an optimal width to fill the window.
I have been attempting to replicate this functionality myself.
Let's say I require a minimum width of 500px. If there is a window width of 1000px, it would show 2 blocks per row. With 1500px, it would display 3 blocks per row, and so forth. The challenge lies in ensuring that the width of each block dynamically adjusts to accurately occupy the available space within the browser window.
I distinctly remember observing this effect functioning without Javascript enabled, leading me to believe that the solution lies within CSS.