or to fillup each column first before starting a new row. int(currentrow / ((recordcount+1)/columns))
example 10 records, 2 columns 1/((10+1)/2)=0 <=== designate the column to display 2/((10+1)/2)=0 3/((10+1)/2)=0 4/((10+1)/2)=0 5/((10+1)/2)=0 6/((10+1)/2)=1 7/((10+1)/2)=1 8/((10+1)/2)=1 9/((10+1)/2)=1 10/((10+1)/2)=1 sample output <table> <tr><td><cfset col=0> <cfoutput query="dirlist"> <cfif col is int(currentrow / ((recordcount+1)/columns))> filename<br> <cfelse> <cfset col = col+1> </td><td>filename<br> </cfif> </cfoutput> </td></tr> could be cleaned up lots - done quickly. Eric From: Alex <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: CF-Talk <[EMAIL PROTECTED]> Subject: Re: Can this be done? Date: Wed, 15 May 2002 12:58:00 -0400 (EDT) use MOD. something like ... <!--- quad column checkboxes ---> <cfif getSubCats.CurrentRow MOD 4 IS 0> </tr> <tr> </cfif> On Wed, 15 May 2002, phumes1 wrote: > Hi, > > This might be a crazy question but here it goes. > > I'm using <cfdirectory to list files on our server. Some directories can > have a 100+ files in them. Presently I'm displaying the list down the left > side of my webpage under each other. > > file1.txt > file2.txt > file3.txt > file4.txt > file5.txt > etc... > > I was wondering if there is a way automatically using a table to do the > following and if so, how? > > > file1.txt file5.txt file9.txt file13.txt file17.txt > file2.txt file6.txt file10.txt file14.txt file18.txt > file3.txt file7.txt file11.txt file15.txt file19.txt > file4.txt file8.txt file12.txt file16.txt file20.txt > > > > +-----------------------------------------------------------------------------------+ > > Philip Humeniuk > [EMAIL PROTECTED] > [EMAIL PROTECTED] > +------------------------------------------------------------------------------------+ > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists