I have in a site a list with features which I would like to output over two columns. These features are coming from a comma delimited list. I would like them to output with bullets but so that first the left column fills up to a certain number before the right column gaets records. Is there a way for doing this?
bullets would imply UL and LI
listing the items in “the usual across and down” would require two passes of the data, right? first the odd ones, then the even ones
@ cfStarlight
That is exactly what I mean. Like in a newspaper. I did it for a classified page but there I was using a table structure. I was wondering If there is a way arround that?
I was thinking that but I can’t get my head arround the fuctionality. I was reading an article yesterday on A List Apart: http://www.alistapart.com/articles/multicolumnlists/
Somewhere half way the article the writer (Paul Novitski) describes a way to use CSS to line out ol list items using content: counter(item) but I can’t get my head arround that in my situation.
If any of you have any suggestions or know about a tut that cover something like this.
Thank you in advance
Do you mean down and across
1- 5
2- 6
3- 7
4-
…as opposed to the usual across and down?
1- 2
3- 4
5- 6
7-
down one column and then down a second is real easy, there is no need for those css shenanigans (which, i guarantee you, do not work in all browsers)
cfset n = ListLen(list) / 2
<ul>
cfloop over the list with index from 1 to n
</ul>
<ul>
cfloop over the list with index from n+1 to ListLen(list)
</ul>
vwalah
you can use css to float the ULs so that the lists are side by side (and don’t you ~dare~ think of putting them into a table)
listing across then down is only moderately trickier, but it’s the same basic structure, with different index values inside the two cfloops
Damn… couldn’t you have made it more fun by wanting at least 3 columns? At least that would’ve required a little more math …
Thank you so much rudi! i’m going to work with this