Ocelot20
Ocelot20

Reputation: 10800

Good way to split data into two side-by-side HTML tables

Basically, given data like this:

Col 1 | Col 2
  1       7
  2       8
  3       9
  4       10
  5       11
  6       12

I want to have the page display something like this:

Col 1 | Col 2      Col 1 | Col 2
  1       7          4       10
  2       8          5       11
  3       9          6       12

The purpose of course is that I have extra horizontal space with less vertical space. Obviously it doesn't take a rocket scientist to pull this off, but I feel like I might be missing a cleaner/easier solution than my own, perhaps using CSS or clever use of an existing ASP.NET control. It seems like a common enough requirement, but I can't quite get the search terms right to find what I'm looking for.

Thanks in advance.

Upvotes: 1

Views: 1296

Answers (1)

Liam Spencer
Liam Spencer

Reputation: 936

You could have two tables displaying the results, and have them side by side using the float attribute?

.table_left {
     float:left;
}

.table_right {
     float:right;
}

Upvotes: 1

Related Questions