I use this for a 4 wide table.... So you could adapt it to fit 2...

<table width="100%" border="0" cellspacing="9" cellpadding="0"
background="images/main/box_bgn.gif">
        <CFIF qryImages.RecordCount>
                <CFSET iCount = 1>
                <CFSET iListPos = 1>
                <CFLOOP QUERY="qryImages" STARTROW="#iStart#"
ENDROW="#Val(iStart + (iMax - 1))#">
                        <CFOUTPUT>
                                <CFIF iCount EQ 1>
                                        <tr>
                                </CFIF>
                                <CFIF qryImages.PhotoActive AND
FileExists(ExpandPath("photos/thumbs/#qryImages.PhotoImage#"))>
                                        <td align="center" valign="middle"
width="25%"><a href="index.cfm?Img=#qryImages.PhotoID#&action=photo"><img
src="photos/thumbs/#qryImages.PhotoImage#" width="140" height="105"
alt="#qryImages.PhotoName#" title="#qryImages.PhotoName#"
border="0"></a></td>
                                <CFELSEIF NOT qryImages.PhotoActive>
                                        <td align="center" valign="middle"
width="25%"><img src="images/view/removed.gif" height="105"
width="140"></td>
                                <CFELSE>
                                        <td align="center" valign="middle"
width="25%"><img src="images/null.gif" height="1" width="1"></td>
                                </CFIF>
                                <CFIF iCount EQ 4>
                                        </tr>
                                        <CFSET iCount = 1>
                                <CFELSE>
                                        <CFSET iCount = iCount + 1>
                                </CFIF>
                        </CFOUTPUT>
                        <CFSET iListPos = iListPos + 1>
                </CFLOOP>
                
                <!--- Make sure the gallery table cells close --->
                <CFIF iCount GT 1> 
                        <CFLOOP CONDITION="#iCount# NEQ 6">
                                <CFOUTPUT>
                                        <td><img src="images/null.gif"
height="1" width="1"></td>
                                </CFOUTPUT>
                                <CFSET iCount = iCount + 1>
                        </CFLOOP>
                        </tr>
                </CFIF>
        <CFELSE>
                <tr><td height="105">There are currently no photos in this
album</td></tr>
        </CFIF>
</table>


HTH

Mikey



-----Original Message-----
From: Jeff [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 6, 2003 16:42
To: CF-Talk
Subject: Re: Using mod to display two across in a table...


on 6/6/03 11:31 AM, Critz at [EMAIL PROTECTED] wrote:

> oi Jeff!!
> 
> if query.currentrow mod 2 eq 0>.....

...then, what? This I can get. It's the closing of the table row that's
throwing me off...in pseudocode, I see this:

<cfif query.currentrow mod 2 eq 0>
  <cfoutput>
  <tr>
    <td><img src="#image#"></td>
    <td><img src="#image#"></td>
  </tr>
  </cfoutput>
</cfif>

But this obviously isn't right...arrrgh...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Get the mailserver that powers this list at 
http://www.coolfusion.com

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

Reply via email to