jQuery Looking for a function to equalize heights of divs based on tallest image in a table.

Posted by Jamie on Stack Overflow See other posts from Stack Overflow or by Jamie
Published on 2011-03-01T23:15:00Z Indexed on 2011/03/01 23:24 UTC
Read the original article Hit count: 234

Filed under:

I am doing a site that will have a table with a bunch of images in them. They are user added images so I have no control over aspect ratio, what I do have control over is I can the force a max height/width and the image will not exceed this in either direction, but the height can (and will) fluctuate.

    <table class="pl_upload"> 
        <tr class="row1"> 
             <td class="col1"> 
           <div>
                  <div class="img-container">
                   <a href="#"><img src="img.jpg" width="182"  alt="X" /></a>
                  </div>
               </div> 
             </td>
         .......

What I need ideally is to get the height of the tallest image and then make the all of the children divs the same height based on the height of the tallest one. I hope that makes sense, been a long day. I made a jsfiddle page for it here: http://jsfiddle.net/Evolution/27EJB/

© Stack Overflow or respective owner

Related posts about jQuery