javascript - setting the height of the parent according to the highest child element, jquery -


i have layout, contains a

<div class="line" id="#"> <div class="summary"> text </div> <div class="summary"> </div> <div class="summary"> long text </div> </div> 

i want, using jquery, expand height of <div class="line"> according highest child element, tried fiddling with:

$(".line").attr("id", function() while ($(this).next().length > 0) { ac = $(this).children(".summary").outerheight(); = $(this).children(".summary").next().outerheight();  if (a > ac) { = ac; } } $(this).css("height", + "px"); }); 

and no success, selectors need use, , how go achieving this?

if indeed summary divs columns in 3 column layout applying float:left on them, wrap container nicely around 3 adding div , style clear:both

so html this:

<div class="line" id="#">   <div class="summary">     text   </div>   <div class="summary">       </div>   <div class="summary">     long text   </div>   <div style="clear:both"></div> </div> 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -