At 05:07 PM 6/24/2003 -0400, you wrote:
>Last week there was code to display a query's content's 'vertically'. Say I
>have the folllowing list:
>
><cfset PairSizeList =
>"8,8.5,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,42,4
>4,46,48">
>
>How would I display that list in a table 'vertically' with 4 columns???

Figure out your list length divvy by 4... so for that list, it would be... 
28 / 4 = 7. Might have to round if your list isn't evenly divisible by 4, 
so that the last column comes up short.

Then loop on your list... since you're talking columns, you're going to be 
putting this in a table, with one row, four cells. Whenever your list loop 
hits (in this case) seven items, close the </td>, open a new <td>. How you 
keep track of when it hits that point is up to you... might just start a 
counter, increment it by one every time, and when that counter hits your 
target value, zero it out and do the </td> <td> bits.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to