views:

49

answers:

2

I am trying to equalize "row" hights of a project I am working on and am running into speed issues. I have 60 to 90 rows and 4 to 10 columns. This whole setup cannot be generated in a real table due to other requirements so I have been using the jQuery.equalhights plugin, which works great, but when you get to 240 "cells" it takes about 5 seconds to finish on IE7 & 8 (FF and other modern browsers are fast)

So is there a faster way to do this then looping though every div in the row and recording the tallest then setting the hight on all the divs to the tallest hight?

Example HTML. I need all *row-# divs to be equal height to the all other *row-#. So the height of label-row-0 = item-1-row0 = item-2-row-0 = item-3-row-0 = item-4-row-0 and the max height in this happens to be item-2-row-0

<div style="float: left">
    <div id="label-row-0">label</div>
    <div id="label-row-1">label</div>
    <div id="label-row-2">label</div>
    <div id="label-row-3">label</div>
</div>
<ul style="margin: 0; padding: 0; list-style: none; float: left;">
    <li>
        <div id="item-1-row-0">bla</div>
        <div id="item-1-row-1">bla<br/>bla</div>
        <div id="item-1-row-2">bla<br/>bla</div>
        <div id="item-1-row-3">bla<br/>blabla<br/>blabla<br/>bla</div>
    </li>
    <li>
        <div id="item-2-row-0">bla<br/>blabla<br/>bla</div>
        <div id="item-2-row-1">bla</div>
        <div id="item-2-row-2">bla bla bla</div>
        <div id="item-2-row-3">bla<br/>bla</div>
    </li>
    <li>
        <div id="item-3-row-0">bla</div>
        <div id="item-3-row-1">bla</div>
        <div id="item-3-row-2">bla</div>
        <div id="item-3-row-3">bla</div>
    </li>
    <li>
        <div id="item-4-row-0">blabl;a bhdks</div>
        <div id="item-4-row-1">fvhsdjk vbhsdivbsibn ikvjchwib</div>
        <div id="item-4-row-2">gfwei bcvieufhci bwuued</div>
        <div id="item-4-row-3">fgbuisdk bnib cieuh9b</div>
    </li>
</ul>

The li elements are sortable via jQuery UI and need to be allowed to horizontally scroll while keeping the label div fixed in-place. I am basically building a column centric table that has a locked column and locked header and it needs to be column sortable, which I have found no way to do with a regular table or existing jQuery plugins

+1  A: 

Check http://www.ejeliot.com/blog/61

Wollen Muts
@djgilcrease: Any luck so far?
Wollen Muts
Nope neither of the links you provided will work for me since it requires all dives to be equalized to be contained in a container div and if I could do that I would just render them with the table-row display type and be done with it. I updated the question to show an example of the code I am using.
A: 

As I can only supply 1 link per post, here is another link: http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks.

Wollen Muts