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

The Archive Base Latest Questions

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

Is it possible using a standard unordered list with a fixed height, to have

  • 0

Is it possible using a standard unordered list with a fixed height, to have overflowing elements flow into the next column.

Essentially I’m trying to achieve a magazine style layout where each article is stacked vertically.

Example code at http://jsfiddle.net/uDAJy/1/

I would expect the list items numbered 2, to be in the next column.

Thanks

Ben

Solution

I’m going to go down the CSS3 route that @Sime posted where possible.

For IE:

As the articles on the page are variable widths I couldn’t find a clean solution without doing some server side programming.

This involved first calculating the number of items per column (forgive the c#):

int itemsPerColumn = Model.Posts.Count / 5; // 5 columns on our page

if (Model.Posts.Count % 5 > 0) {
    itemsPerColumn++; // so 8 articles would yield 2 per column
}

We then loop through each article and increment a counter.

If i % itemsPerColumn == 0 we create an opening column div.

After rendering the item we check if (i + 1) % itemsPerColumn == 0 and if so render a closing column div.

Then we increment the counter.

Not quite as nice as the CSS3 solution but it works 🙂

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

    Here you go:

    HTML:

    <div class="wrapper">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
            <li>6</li>
            <li>7</li>
            <li>8</li>
            <li>9</li>
            <li>10</li>
            <li>11</li>
            <li>12</li>
        </ul>
    </div>
    

    CSS:

    .wrapper { 
        border:2px solid red;
        height:604px;
        width:464px;
        padding:16px;
        -webkit-column-width:144px;
        -webkit-column-gap:16px;
        -moz-column-width:144px;
        -moz-column-gap:16px;
        column-width:144px;
        column-gap:16px;
    }
    
    .wrapper li { 
        width:144px;
        height:108px;
        background:#ccc;
        margin:16px 0;
    }
    

    Live demo: http://jsfiddle.net/uDAJy/5/show/

    This should work in all browsers except IE. (I only have Chrome on my notebook, so I can’t test this in the other browsers.)

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

Sidebar

Related Questions

Is it possible to replace the standard broken image via CSS or using another
Is it possible to using paging functionality in Linq queries? Let's say I have
Is it possible (by using the stock c# TreeView) to have Multiline TreeNodes? Also,
Is it possible to clear a file preserving its timestamp, using standard Linux commands?
I have a WPF window with a textbox, using standard WPF Databinding to an
If possible, using only standard PHP functions like substr(), strrpos(), strpos(), etc.
I am wondering if it is possible to post data without using the standard
I have a seam component where I put a message using standard seam annotation:
Is it possible to implement a non-blocking client socket? I have tried using sockfd
I am not sure if this is possible using standard web technologies. I want

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.