Search code examples
htmlhtml-tableword-wrap

Can I wrap a table vertically?


I have a table that is much taller than it is wide.

I want to know if it's possible to make the table wrap vertically so that instead of scrolling to see the data, the table 'wraps' to the unused portion of the page.

This is the basic format I want

01   05   09
02   06   10
03   07   11
04   08   12

My thought is that I could manage it all via javascript but before I do things the hard way, what's the best way to approach this?


Solution

  • How about this..

    Live Demo


    Notes:

    • Table must have <thead> and <tbody>
    • Probably breaks under many conditions (colspan, rowspan, empty cells)
    • Some styling dependent on CSS3
    • Code is not streamlined