I have a dataset that needs to be presented in a grid format that adjusts based on the size of the screen.
The data is arranged alphabetically, and I prefer to showcase it column by column for better readability:
|---------|--------|--------|
| Abi | Donald | George |
| Boris | Ernest | Harold |
| Charlie | Frank | Ivan |
When viewed on a wider desktop viewport, it might appear like this:
|-------|---------|--------|--------|------|
| Abi | Charlie | Ernest | George | Ivan |
| Boris | Donald | Frank | Harold | |
Since the table is responsive, the number of columns (and subsequently rows) could vary. While Twitter Bootstrap makes it easy to achieve responsiveness using .col-md-3
, I want my table to populate vertically, by column.
Is there a way to accomplish this only with CSS without resorting to reordering and calculating with Javascript?