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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:42:00+00:00 2026-05-23T06:42:00+00:00

I have a given markup that I’m trying to apply to some style on.

  • 0

I have a given markup that I’m trying to apply to some style on. Having little (but some) flexibility with the markup, and would ideally like to do this in CSS only, if possible.

Each of the <li>‘s divs are of variable height based on content, but in the end, I would like to end up with all <li>s of equal height (height of largest column).

What is the best way of doing this?

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Table row</title>
<style type="text/css" media="screen">
body {
    margin:0;
    padding:0;
}

ul
{
    list-style-type: none;
    background-color: yellow;
}

li
{
    display: inline-block;
}

li div
{
    width:200px;
}
</style>
</head>

<body>
<ul>
    <li>
        <div class="divA" style="background-color:red;">
        hello<br/>world
        </div>
    </li>
    <li>
        <div class="divB"  style="background-color:blue;"/>
        hello<br/>world hello<br/>world
        </div>
    </li>
    <li>
        <div class="divC" style="background-color:green;"/>
        hello<br/>world hello<br/>world hello<br/>world
        </div>
    </li>
    </ul>
</body>
</html>
  • 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-23T06:42:01+00:00Added an answer on May 23, 2026 at 6:42 am

    If you want every <li> to have the height of the tallest <li>, these are your options:

    • Hardcode the height of the <li>s, or
    • Use JavaScript to programmatically compute and apply the height, or
    • Use a table.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have given bg image for radio button. It is working in chrome but
Lots of style-related jquery autocomplete questions (yow), but none that want to "match the
I have the fallowing markup: <div class=container> <div style=display:none>1</div> <div style=display:none>2</div> <div style=display:none>3</div> </div>
Given the following markup: <div class=foo> <!-- comments --> some junk content <input type=button
I have given a default value 2.5 for a textbox called diff_Box and then
I have given 100% width to input box to fix to the browser width
i have given required permission : <uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE /> hard-coded the path as /sdcard/filename
I have given client's queue connection details to connect to it using Camel. While
I have given a table background image using css background-image property. The cells are
Note: I have given up on compiling iPhone Apps without a developer certificate for

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.