Jayesh Patel
Filed under - jQuery, Web Designer Help
No Comments so far. Add yours now

I came up with a simple solution quite a while ago using just a few lines of jQuery.

Let’s say we have the following list

[code]<ul class="floatinglist">
<li>some information</li>
<li>some more information</li>
. . .
<li>even more information</li>

By adding the following js code to your page the problem is solved

[code lang="js"]$(document).ready(function(){
var maxheight = 0;
$('.floatinglist li').each(function(){
if (maxheight < $(this).height()) {
maxheight = $(this).height();
$('.floatinglist li').height(maxheight);

Now all the list items get the height of the biggest one and they float as expected.

Uploaded Files:

Leave your comment

You must be logged in to post a comment.

Share IT © 2018. All rights reserved.