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 6688665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:25:45+00:00 2026-05-26T05:25:45+00:00

I have 4 inline-block elements with fixed width but variable content, and I want

  • 0

I have 4 inline-block elements with fixed width but variable content, and I want all of these elements to have the same height – that of the largest element. Please see This jsfiddle.

How should I achieve this? If its not possible to do it using only css, what is the right way to do it using javascript?

  • 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-26T05:25:46+00:00Added an answer on May 26, 2026 at 5:25 am

    probably better to make it modular and reusable, in mootools, you can prototype a HTML collection:

    Elements.implement({
        setEqualHeight: function(height) {
            height = height || Math.max.apply(Math, this.map(function(el) { 
                return el.getSize().y 
            }));
            this.setStyle("height", height);
        }
    });
    
    // use tallest as height for all
    document.getElements("div.equals").setEqualHeight(); 
    // or hardwire all to 500...
    document.getElements("div.equals").setEqualHeight(500); 
    

    fiddle. http://jsfiddle.net/TxtBQ/2/

    and with your ul/li: http://jsfiddle.net/kKZXj/8/

    works on anything, they don’t even need to be close to each other

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a <a> element as inline block with a fixed width. I would
I have a class that had an inline member, but I later decided that
HI, I want to find all input elements in a HTML string that has
Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means
I have a container div with a fixed width and height , with overflow:
Ok so the question is simple: I have a variable width and height div
http://iempire.ru/untitled.html How to remove the indents between inline li -elements? margin: 0, display:inline-block have
Ok, I have read a lot of times that inline elements should never contain
I have an li styled as follows: li{ display:inline-block; padding:5px; border:1px solid none; }
In my test, I have 2 spans both set to display:inline-block with a border

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.