Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 356067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:04:36+00:00 2026-05-12T12:04:36+00:00

I’ve got a floated list of elements which I want the same height on.

  • 0

I’ve got a floated list of elements which I want the same height on. But there is more than one list per page, and they all use the same class-name.

How to I reset the tallest variable for each list so they don’t all inherit the height from the tallest list-item on the page, but only from within it’s own list?

Here’s my HTML:

<ul class="thumbs">
   <li class="thumb">
      <img />
      <p>Some text</p>
   </li>
   <li class="thumb">
      <img />
      <p>Some text</p>
   </li>
</ul>

<!-- Same classnames, different content. Just an example, it's not 
     necessary with or without images                           -->
<ul class="thumbs">
   <li class="thumb">
      <p>Some text</p>
      <p>Some more text</p>
   </li>
   <li class="thumb">
      <p>Some text</p>
   </li>
</ul>

Here’s the jQuery equalHeights plugin I’m using:

(function($) {
    $.fn.equalHeights = function(minHeight, maxHeight) {
        tallest = (minHeight) ? minHeight : 0;
        this.each(function() {
            if($(this).height() > tallest) {
                tallest = $(this).height();
            }
        });
        if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
        return this.each(function() {
            $(this).height(tallest).css("overflow","auto");
        });
    }
})(jQuery);

which I call with:

$(function() {
   $('.thumb').equalHeights();
});

I also don’t want to add new classes or id’s to the markup.

Thanks.

Update – adding some examples of the different <li>‘s I have. There are many, so not even sure if I’ve cought them all here:

<ul class="thumbs">
<li class="thumb first">
    <p class="boxHeading">Featured collection</p>
    <h3><a class="boxFeatured" href="#">Dining chair <span class="by">by bowline</span></a></h3>
    <div class="img">
        <img src="media/dummy/diningChair.jpg" width="250" height="180" alt="Dining chair" />
    </div>
</li>
</ul>

<ul class="thumbs">
<li class="thumb">
    <div class="img">
        <img src="media/dummy/diningChair3.jpg" width="204" height="156" alt="DiningChair3" />
    </div>
    <h4 class="readMore"><a class="readMore" href="link/that/biggerlink.js/follows">Product name</a></h4>
    <dl class="boxDescription">
        <dt>By:</dt>
        <dd><a href="#">Vincent Shephard</a></dd>
        <dt>Colour:</dt>
        <dd>brown, white</dd>
        <dt>Price:</dt>
        <dd>$XXX.XX</dd>
    </dl>
</li>
</ul>

<ul class="thumbs">
<li class="thumb">
    <h3 class="boxHeading"><a href="#">Featured collection</a></h3>
    <div class="img">
        <img src="media/dummy/diningChair.jpg" width="232" height="180" alt="Dining chair" />
    </div>
    <p class="readMore">
        In one word, you reproach us with intending 
        to do away with your property.  Precisely so; 
        that is just what we intend.
    </p>
</li>
</ul>

<ul class="thumbs">
<li class="thumb first">
    <h3 class="boxHeading"><a href="#">Tables (category)</a></h3>
    <div class="img">
        <img src="media/dummy/diningChair.jpg" width="232" height="180" alt="Dining chair" />
    </div>
</li>
</ul>

<ul class="thumbs">
<li class="thumb first">
    <h4 class="small"><a class="small" href="test.html">Product name</a></h4>
    <div class="img">
        <img src="media/dummy/diningChair.jpg" width="204" height="156" alt="Dining chair" />
    </div>
</li>
</ul>

<ul class="thumbs">
<li class="thumb dropShadow offwhite first center">
    <div class="img">
        <img src="media/dummy/recent1.jpg" width="134" height="180" alt="Advertisement1" />
    </div>
    <h4 class="small bold"><a class="small bold">Inside Out</a></h4>
    <p>July 2009</p>
</li>
</ul>

That should cover all of them, although I might have missed some. Thanks for your patience.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:04:36+00:00Added an answer on May 12, 2026 at 12:04 pm
    $('.thumbs').each(function(){
        $('.thumb', this).equalHeights();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.