Michael Doyle
Michael Doyle

Reputation: 147

Display 3 columns of same height with variable amount of data

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.

Upvotes: 0

Views: 251

Answers (2)

Brent Friar
Brent Friar

Reputation: 10609

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.

Upvotes: 2

ClarkeyBoy
ClarkeyBoy

Reputation: 5010

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.

Upvotes: -1

Related Questions