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

  • Home
  • SEARCH
  • 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 715855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:14:01+00:00 2026-05-14T05:14:01+00:00

I am trying to create a grid like system with div’s with content floated

  • 0

I am trying to create a grid like system with div’s with content floated left. The problem is that the height of each div is not static since the content is different in each one. Since the height is different.. things get outta whack if one is taller then another in one row.

Is there some sort of css way or js (prefer javascript) way to get around this. I really want to avoid setting large heights on the divs to get them to line up.

You can see the example here: http://www.foreclosurejournalinc.com/index.php?option=com_hotproperty&view=type&id=1

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

    First off – it is not correct to use a table in this situation: The table structure defines a relationship between data in the same row, and data in the same column. Since the second column is the same type of data as the first, there’s no table relationship here.

    You shouldn’t use a table because you’re defining your layout in markup, so you can only ever have two columns. For example, if the client decides they want three columns, or you want to show a single-column list for a mobile view or print stylesheet, you need to change the markup (or even have several sets of markup for different purposes).

    Flexible markup

    OK – let’s look at your markup. At the moment, you have almost got a table structure, because you’re wrapping each row in a DIV. Again, this means you can’t ever have a single column or 3 or 4 columns side-by-side.

    A more flexible solution is to markup your data as a list. Because it’s sorted, an ordered list is the right choice:

    <ol id="list_properties">
    
      <li class="property">
        <h3 class="propertyTitle"><a href="#">08-CA-001731</a></h3>
        <dl class="details">
          <dt>Plantiff</dt>
          <dd>Bob's Mortgages</dd>
          <dt>Defendant</dt>
          <dd>Harry Skinflint</dd>
        </dl>
      </li>
    
      <li class="property">
        <h3 class="propertyTitle"><a href="#">08-CA-001731</a></h3>
        <dl class="details">
          <dt>Plantiff</dt>
          <dd>Bob's Mortgages</dd>
          <dt>Defendant</dt>
          <dd>Harry Skinflint</dd>
        </dl>
      </li>
    
    </ol>
    

    You’ll have one <li class="property"> per item in your ‘grid’. I’ve suggested some nicer markup for the details, too – help yourself to that if you like.

    Now to finish it off: Sadly, this can’t be done in a cross browser fashion without a bit of final tweaking with Javascript. That said, the JS is unobtrusive, so it really only acts as a bit of polish at the end.

    Base styling

    Your base styles will look like:

    #list_properties {
      list-style:none;
      margin:0;
      padding:0;
      width:960px;
      float:left;
    }
    
    #list_properties li.property{
      width:430px;
      float:left;
      margin:0 50px 50px 0;
      min-height:16em; /* For FF, Safari, Opera, IE8 */
      _height:16em; /* For IE6 */
      *height:16em; /* For IE7 */
    }
    

    That recreates the columns – at this stage, if all of the boxes had a height less than 16em, this would be all you need.

    Javascript polish

    To make sure everything is rock solid, I’d use the equal heights plugin for jQuery: http://www.cssnewbie.com/equalheights-jquery-plugin/ Basically, you pass it your container (#list_properties) and it scans each of the children (li.property), and sets the height of each one to the height of the tallest item.

    So, for instance, one item has extra information and needs 18ems of height, all of the other items are set to 18em too.

    The linked site has documentation for getting it going, but once you’ve got jquery and the plugin ready, you need only do:

    $(function(){
      $('#list_properties').equalHeights();
    });
    

    Once you get it set up this way, you can modify the number of items in the column just by changing the width of the li.property.

    A last thought…

    I’m just thinking, what is the advantage of displaying this list in columns, anyway? After all, the user can sort the list – wouldn’t a single-column list be easier to scan? I’m assuming the user will be looking for a particular item, rather than just browsing through semi-randomly.

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

Sidebar

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.