views:

35

answers:

2

Hi all, I had a question with regards to fluid arrangement of tables. I have attached a screen-shot below to try and explain what I am trying to achieve.

Basically, I have a number of dynamically created tables. Their widths are fixed but their heights can vary. What I am trying to achieve is, the maximum utilization of space when the browser window is re-sized (in terms of organization of the tables).

I have tried the following: 1. Arrange the tables in descending order of the number of rows they have. 2. Using a style of 'float: left;' on the table (or a div surrounding the table).

However, as you can see below, there is a gap below on the first column that could have been utilized by table 4 (the last one below), but it hasn't because table 3 (column 2, row 2) is taking up some space which prevents table 4 from being placed above.

I hope I've described it in a manner that could be understood, if not please let me know how I could clarify any points so that you could help me out.

Basically trying to get a fluid design with the maximum space utilization. Any ideas on how I could achieve this?

Thanks in advance. Example

A: 

Can't be done without javascript (or a whole lot of assumptions and restrictions).

Try the Columnizer jQuery Plugin.

Brock Adams
A: 

Try the jQuery Masonry plug-in.

Ken Redler