Andy,

Beautiful news for you!!!

You can use either method and your 'display' will be correct.  Loop over a <td> 
in a <table> or loop over a <li> in a <ul> that is formatted through CSS.

The CSS method's main benefit to users is that the code is 'accessible' to 
screen readers, but you will need to have more than a cursory knowledge of HTML 
and CSS concepts. (Not a bad idea to 'bone up' on this if you don't have it 
already, the future of design is dependant on them)

If you are just trying to make a client happy, you can:
<cfset loopcount = 12>
<cfset loopbreak = ceiling(loopcount/3)>
<table>
    <tr>
        <td>
            <cfloop from="1" to="#loopcount#" index="currloop">
                #yourARRAY/yourQUERY[currloop]#<br />
                <cfif currloop mod loopbreak eq 0>
                    </td>
                    <td>
                </cfif>
            </cfloop>
        </td>
    </tr>
</table>

 

You should keep in mind though, there are a 'ton' of ways to accomplish what 
you are looking to do.  The best way is the way that makes the most sense to 
you and your client.
William

----------
William E. Seiter
ColdFusion Programmer / Web Developer

Free Website Trade Publication >> Website Magazine
Be sure to answer all of the questions on the subscription form, small price to 
pay for the loads of excellent content this magazine offers to Web 
Professionals for FREE!!

 

> I'm looking to output a series of ULs and LIs in a 3 column fashion, 
> like this:
> 
> link1----------link4----------link7
> link2----------link5----------link8
> link3----------link6
> 
> I've got code which lets me do it like this:
> 
> link1----------link2----------link3
> link4----------link5----------link6
> link7----------link8
> 
> But I'm a little mystified at how to accomplish the first. I actually 
> thought it would be a piece of cake since I could just easily output 
> the LIs inside the UL, but figuring out how many should be in each is 
> bigger challenge than I first thought. Anyone have code like this 
> already written?
> 
> Yes, I feel like a chump because of this.
> No I haven't had any coffee yet today.
> Yes I'm going home to cry on my huge pilla'. 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311001
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to