all
I am creating my menu list in footer dynamically.
now in one row max 3 div can be possible then next 4th div will be set under first.
My problem is now the above 3 div has different height. while creating the 2nd row its take the 1st row max height.
see the image you will more clear what i want

jQuery Masonry is an option to solve this, though possibly overkill for your reasonably simple situation.
Is the width of that brown box fluid or fixed?