Help!

Or search support forum

What's Global Moxie?

Global Moxie is the hypertext laboratory of Josh Clark, a designer, developer, and author who offers workshops and consulting for iPhone app design. He’s also creator of Big Medium, a web content management system. Josh spins words and code from multimedia studios in Providence, RI, and Paris, France.

What's Big Medium?

Big Medium is flexible, easy-to-use server software for creating and editing websites directly from your browser. Check out the features or download now.

On Shelves

Books by Josh Clark

Tap Happy: Designing Great iPhone Apps

Best iPhone Apps: The Guide for Discriminating Downloaders

iWork ’09: The Mising Manual

Moxiemail

Enter your e-mail to receive occasional updates:

How can I display link lists horizontally or in columns?

Question

How can I display link lists horizontally on in columns?

Answer

With a few minor tweaks to your page templates and your theme style sheet, you can make any of Big Medium’s link widgets present links horizontally across the page.

The premise

The HTML generated by Big Medium’s link widgets places each link inside its own <div> tag, with class bmw_link. By adding CSS styles that float each of these <div> elements to the left, the links stack up horizontally instead of vertically.

Setting the width of these <div> elements sets the width of the column. The right margin sets the “gutter” spacing between each column, and the bottom margin sets the spacing between each row.

The hitch

If you want one link widget to display more than a single row of links, you have to set each link’s text block to a fixed height. Otherwise, if one of the text blocks in one row is larger than the others, it will “catch” the first item of the next row, preventing it from aligning at the left of the row, and the whole thing is thrown out of whack.

By setting the links to a fixed height, we can enforce a grid no matter how much text is in each link. The drawback: If a link’s text block is longer than this height, its text will be clipped.

Putting it all together

  1. In Big Medium, go to “Layout>Edit Templates.”

  2. Select the template where you want to display links horizontally.

  3. Edit the template, wrapping the widget you want to display horizontally in a <div> with a “horizontal” class. For example:

    <div class="horizontal">
        <%links%>
    </div>
    
  4. After saving the template, follow the link on the next page to rebuild the necessary pages.

  5. Go to “Layout>Edit Theme Style Sheet” and add the following CSS to your styles, editing the values to suit your design. For example, the following will display links in three columns in a 500-pixel block.

    div.horizontal {
        width: 500px;        /*overall width for the block of links */
        overflow: hidden;
    }
    div.horizontal div.bmw_link {
        float: left;
        width: 150px;        /* width of each column */
        height: 150px;       /* height of each row */
        margin-right: 15px;  /* spacing between columns */
        margin-bottom: 15px; /* spacing between rows */
        overflow: hidden;
    }
    
  6. Save the settings, and you’re done.

Download Big Medium
Try it free for 30 days, or buy to unlock.

Cures Headaches

"I love Big Medium! Running a site with so many different types of content to keep fresh is very time consuming. I'm so glad that adding fresh articles is now the least of my headaches. Many thanks for all the hours I'll save with site upkeep!"
—Karen Denning

"The installation instructions are seriously good. I cannot remember seeing any better manual in the world of computers. Microsoft, Apple, Adobe, vBulletin, et al could benefit by taking a page from Global Moxie’s book!"
—Kathleen Tinkel

More praise for Big Medium