Ian - it did make it and you got the following reply I believe:
 

-----Original Message-----

From: Stephen Milligan [mailto:[EMAIL PROTECTED]

Sent: 05 April 2004 21:21

To: [EMAIL PROTECTED]

Subject: RE: [ cf-dev ] displaying images 4 across in a table...

 

The logic to do it works something like this:

<!--- The number of columns required --->

<cfset cols = 4>

<!--- The number of loop iterations to run through --->

<cfset records = 50>

<!--- The number of empty cells to put in the final row --->

<cfset padding = records mod cols>

<!--- Open the table tag and first row --->

<table>

<tr>

<!--- Loop over the recordset, array or whatever --->

<cfloop from="1" to="#records#" index="i">

<!--- Output the image tag inside the table cell --->

<td>#i#</td>

<!--- Check if i is exactly divisible by the number of columns. If so, close

the row and start a new one --->

<cfif i mod cols EQ 0>

</tr>

<tr>

</cfif>

</cfloop>

<!--- Create the padding cells --->

<cfloop from="1" to="#padding#" index="i">

<td>&nbsp;</td>

</cfloop>

<!--- Close out the table --->

</tr>

</table>

HTH

Spike

 

_______________________________________________________

 Regards,
                Richard Lovelock,
                Senior Application Analyst.

Westminster City Council - Web Support
Cap Gemini Ernst & Young
Southbank
95 Wandsworth Road
London
SW8 2HG

(     0870 906 7482
 
_______________________________________________________

-----Original Message-----
From: Ian Westbrook (BT account) [mailto:[EMAIL PROTECTED]
Sent: 06 April 2004 12:13
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] displaying images 4 across in a table...

I sent this yesterday evening, but it doesn't seem to have made it, so am resending...
 
-------------------------------------------------------------
 
Hi
This is probably real simple, but it's something I've never done before...
 
If I wanted to display a record set 8 records at a time, but in a table 4 across by 2 down (ie 4 cols, 2 rows), how would I do that? I've looked at cftable, but that jusr seems to do the same as looping a table row in a query output.
 
I've got a lot of images, and I want to dislay them as thumbnails (or, rather, setting the size in the output html) 8 at a time, in a 4x2 matrix.
 
Can someone give me some clues?
 
ta
 
Ian W


=======================================================

This message contains information that may be privileged or
confidential and is the property of the Cap Gemini Ernst & Young
Group. It is intended only for the person to whom it is addressed. If you
are not the intended recipient, you are not authorised to read, print,
retain, copy, disseminate, distribute, or use this message or any part
thereof. If you receive this message in error, please notify the sender
immediately and delete all copies of this message.

=======================================================

Reply via email to