Creating Two Column Unordered <ul> Lists

Creating Two Column Unordered ListsI’ve been searching like mad how to split an unordered list <ul> into two columns and haven’t found an easy solution.  By using combined info from a few sites I figured out an easy way to do it.  If you already know how to do this then mozie on down folks.  Here it is:

Make a <div class=”double_column_list”> and put a <ul> in it with some list items.   Set the <li> class to display at 50% width and float it to the left.

CSS

.double_column_list li {float: left; width: 50%;}

HTML

<div class="double_column_list">
<ul>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
</ul>
</div>

Result

  • Awesome Stuff
  • Awesome Stuff
  • Awesome Stuff
  • Awesome Stuff

Boosh, 2 column unordered lists.

15 Comments on “Creating Two Column Unordered <ul> Lists” Comments RSS Feed

  1. Susan says:

    I plan to try this out, very cool. When I have wanted two columns in the past, I made a table.
    Then in the table cells unordered lists were made. This method is cool, no need to make the tables. Thanks!

  2. Vernon Young says:

    I am upgrading our web site and I used your
    two column list on one page and it works
    cool. I want to know could I use this in a site map. I tried but it runs together. how do I separate the list. Thanks!
    VRY6

  3. Joseph says:

    After the I receive no line break when I begin a paragraph of text, and ideas?

  4. Joseph says:

    Guess I can’t type html in here :)

    after the closed DIV I receive no line break when I begin a new paragraph, any ideas?

  5. Joseph says:

    Here is what I am dealing with:

    .double_column_list li {float: left; width: 50%; }


    Computer is running slow
    Error messages
    Computer stops responding
    Blue Screens
    Your computer doesn’t bootup
    Stop “0×0000000″ errors
    Computer randomly reboots
    Clicking, whining, or other loud noises
    Computer will not power on
    Error messages during bootup

    I begin to type here, but there is no line break between these words and the above

  6. Joseph says:

    How do you type html in here?

  7. Joseph says:

    .double_column_list li {float: left; width: 50%; }


    Computer is running slow
    Error messages
    Computer stops responding
    Blue Screens
    Your computer doesn’t bootup
    Stop “0×0000000″ errors
    Computer randomly reboots
    Clicking, whining, or other loud noises
    Computer will not power on
    Error messages during bootup

    <!–Official Yearbook of the United Kingdom–>

    I type here but there is no space between this and Error messages during bootup

    • Garrett says:

      Hi Joseph,

      I’m sorry, I’m a little unclear on what your problem is. Could it just be a margin issue? Try adding more margin-bottom on the div to push the text below down. It’s hard to help without seeing the code.

      -Garrett

  8. Joseph says:

    Well using pre tags to show html in this forum is not working for me :(

  9. Joseph says:

    ok, here goes:

    I have .double_column_list li {float: left; width: 50%;}

    up in my style sheet area

    Then I have

    <div class="double_column_list">
                      <ul>
                       <b>
                        <li>Computer is running slow</li>
                        <li>Error messages</li>
                        <li>Computer stops responding</li>
                        <li>Blue Screens</li>
                        <li>Your computer doesn't bootup</li>
                        <li>Stop "0x0000000" errors</li>
                        <li>Computer randomly reboots</li>
                        <li>Clicking, whining, or other loud noises</li>
                        <li>Computer will not power on</li>
                        <li>Error messages during bootup</li></b>
                    <!--<li><a href="http://www.statistics.gov.uk/StatBase/Product.asp?vlnk=5703">Official Yearbook of the United Kingdom</a>-->
                       
                     </ul>
                    </div>
    
    <p>Sometimes computers just break. They don't do what you want them to, and when they really want to make, you mad they give you the Blue Screen of Death.</p>
                    <p>When your computer becomes unusable <b>MyPC Solutions</b> is there to help.</p>
                    <p>If you are experiencing any of the problems below, bring your computer in so we can get to work:</p>

    when I render the html, it shows that there is no paragraph space between Error Messages during bootup and Sometimes. It is as if I am typing a new sentence and not a paragraph.

    • Garrett says:

      Joseph,

      First, I recommend you add font-weight:bold to your ul instead of using one big bold tag.

      The reason you’re not getting any space below the list is because you need to add some margin. Example:

      .double_column_list { margin-bottom:10px;}

Leave a Reply