Auto-Columns (possible?)
Posted: Sat Jul 04, 2009 7:44 pm
I'm heavily modding phpbb and I'm stuck at something that should be simple.
I need the forum list to display in columns.
As in:
Problem is.. the existing loop treats categories and forums as the same thing, so there is no easy way to divvy up each section. Add on top of that, a template is used that loops through each row.
At this point, I'm here:
http://www.alistapart.com/articles/multicolumnlists/
This is almost what I want (copied from ^):
However, that sorts things as so:
whereas I need things like this:
I'm at a complete loss.
To summarize, I need to create vertical columns auto-magically without any kind of breaking element--they need to "know" where to go.
Is this possible?
I need the forum list to display in columns.
As in:
Code: Select all
f1 f3
f2 f4At this point, I'm here:
http://www.alistapart.com/articles/multicolumnlists/
This is almost what I want (copied from ^):
Code: Select all
<div class="wrapper">
<ol
><li><a href="#">Aloe</a></li
><li><a href="#">Bergamot</a></li
...
><li><a href="#">Oregano</a></li
><li><a href="#">Pennyroyal</a></li
></ol>
<br />
</div><!-- .wrapper -->
The essential CSS is brief:
/* allow room for 3 columns */
ol
{
width: 30em;
}
/* float & allow room for the widest item */
ol li
{
float: left;
width: 10em;
}
/* stop the float */
br
{
clear: left;
}
/* separate the list from subsequent markup */
div.wrapper
{
margin-bottom: 1em;
}
Code: Select all
f1 f2 f3 f4
f5 f6 f7 f8
f9 f10Code: Select all
f1 f4 f7 f10
f2 f5 f8
f3 f6 f9To summarize, I need to create vertical columns auto-magically without any kind of breaking element--they need to "know" where to go.
Is this possible?