trying to match div heights using jQuery, and it seems I can only get it to match the smallest height, but I want it to match the tallest column. from what I can tell the code should find tallest column? so I am very confused, here is what I am using
function matchColHeights(col1, col2) { var col1Height = $(col1).height(); var col2Height = $(col2).height(); if (col1Height < col2Height) { $(col1).height(col2Height); } else { $(col2).height(col1Height); } } $(document).ready(function() { matchColHeights('#leftPanel', '#rightPanel'); }); trying to do it here: http://www.tigerstudiodesign.com/blog/
leftPanelandrightPanelcould be anything. Also, you don't tell us what to look for when they're not the same height. To me, the page design works fine in FF. Can you provide correct/incorrect screenshots or a diagram or something?ready? Specifically into the right column? It appears that when this code is initially running the right column is shorter than the left. If you check the true height value after the everything has run it is taller than the left column. Your JS function works fine, there is something up with that right column.