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

The Archive Base Latest Questions

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

I have a fluid grid built with <li> elements. eg: <ul> <li></li> <li></li> <li></li>

  • 0

I have a fluid grid built with <li> elements.

eg:

<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>​

li
{
    border:solid 1px green;
    width: 100px;
    min-height:50px; 
    display: inline;
    margin: 10px;
    float: left;
}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

so this looks something like:

-----------   -----------   -----------   
|         |   |         |   |         |
|         |   |         |   |         |
-----------   -----------   -----------

-----------   -----------   -----------   
|         |   |         |   |         |
|         |   |         |   |         |
-----------   -----------   -----------

hooray!

The problem is when I add content in one of the <li> elements which stretches the height. I want to end up with something like this:

-----------   -----------   -----------   
| apples  |   |         |   |         |
| oranges |   |         |   |         |
| lemons  |   -----------   -----------
| cherries|
-----------

-----------   -----------   -----------   
|         |   |         |   |         |
|         |   |         |   |         |
-----------   -----------   -----------

But I actually end up with something like this:

-----------   -----------   -----------   
| apples  |   |         |   |         |
| oranges |   |         |   |         |
| lemons  |   -----------   -----------
| cherries|
-----------   -----------   -----------
              |         |   |         |
              |         |   |         |
              -----------   -----------

-----------   
|         |   
|         |   
-----------   

booo!

So basically, I’m trying to keep the ‘row’ aligned when one of the <li>s is pushed down from the above element, instead of it pushing to the available space to the right.

  • 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-16T06:54:24+00:00Added an answer on May 16, 2026 at 6:54 am

    Have a look at the code below.

    Obviously the IE hacks and moz rules should be moved into conditional stylesheets and there are some padding issues (read: use a css reset)

    but other than that this should do the trick….

    alt text http://img835.imageshack.us/img835/9594/example1281542227415.png

    Example

        <style type="text/css">
            ul {
                background-color:#ddddff;
                overflow:auto;
                margin:0;
                padding:0 0 0 4px;
                width:296px;
            }
    
            li {
                background-color:#ddffdd;
                display:inline-block;
    
                /* Trick FF2 into using inline-block */
                display:-moz-inline-stack;
    
                /* Trick IE6 into using inline-block */
                *display: inline;
                zoom:1;
    
                list-style-type:none;
                margin:0 0 0 -4px;
    
                /* Trick IE6 into enforcing min height */
                min-height:50px;
                height:auto !important;
                height:50px;
    
                padding: 0;
                vertical-align:top;
                width:100px;
            }
    
        </style>
    </head>
    
    <body>
    
        <ul>
                <li>apples<br />oranges<br />lemons<br />cherries</li>
                <li>2</li>
                <li>3</li>
                <li>4</li>
                <li>5</li>
                <li>6</li>
        </ul>
    
    </body>
    

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

Sidebar

Related Questions

I have a fluid grid (in height and width). The LIs are always rectangular
I have a fluid page (100% width) with this inside: [image-fixed-width] | [text-fluid-width -----------------------------------]
I have a webpage with a fluid layout with a 100% width. When I
I have nested divs like this (pseudo code..) <div0> <div1></div1> <div2>fluid width</div2> <div3></div3> </div0>
I have a fluid width container DIV. Within this I have 4 DIVs all
I have a supposedly single-threaded FLTK application with a popup menu, created with Fluid.
I have a project that adds elements to an AutoCad drawing. I noticed that
I am having a Fluid Grid System container nested into another container. <div class=fluid_grid_layout>
This is what I'm trying to achieve I have a fluid tooltip and a
I am trying to make a grid that takes up 100% of the width

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.