views:

35

answers:

2

Hi there,

I'm building a page full of hyperlinks which are gotten from querying a content management system, so the number of links is variable.

The requirements need me to display all the links over 3 columns and make it look presentable.

So at the moment I've got myself a Map<Category, Hyperlink> and when I display it at the moment its in one big list on the page.

Is there some way I can dynamically get my columns to flow into each other so that each column contains a similar number of hyperlinks?

Thank you.

+1  A: 

The easiest way I can think of to do this is to put the links in to an unordered list, then set the style for each list item so that they are 33% of the available width and displayed inline.

Brent Friar
The question is "Display 3 columns of **same height** with variable amount of data". I dont think this would achieve this.
ClarkeyBoy
No, read the question again. He is not asking how to make a 3 column template with equal height columns. He has a list of links that currently one big list on the page. He wants to flow the links in to columns with a similar number of hyper links in each column. My solution would do exactly that.
Brent Friar
Sample - http://internextion.com/links_in_columns.html
Brent Friar
Sorry for the late reply - I wasnt notified that a comment had been added. I read the question as meaning 3 columns of **exactly** the same length. If he wanted a different colour in each column then I suppose he would want a combination of both our solutions... Since your answer was actually correct to an extent, alter your answer and I will upvote you again.
ClarkeyBoy
Thanks Clarke, I actually thought the same thing as you when I first read the question, it was pretty easy to miss.
Brent Friar
A: 

You might try looking at the following sites:

The second one is the best one, in my opinion. I used it before when I had the same problem. It gives all the code, really nice illustrations and you can just copy the code free of charge. I think this is exactly what you are looking for.

ClarkeyBoy