Notice: With the launch of Adobe Cookbooks, this site will no longer be accepting new entries or posting new content. Thanks to everyone who submitted content!

Display and Layout

Issues that relate to the display or layout generated from ColdFusion code.

Problems

How can I create a CAPTCHA image with ColdFusion?
CAPTCHA images contain distorted text that is human-readable but not machine-readable. The <cf...

How can I display a message on a long-running page?
By default, ColdFusion will not return any HTML until the entire page has rendered. For a long-runni...

How can I easily control the look and feel of my site?
While non-ColdFusion techniques like an effective CSS file are one way to easily control layout acro...

How can I ensure there are no leading or trailing spaces in my variable?
When working with data that you have no control over, you sometimes need to do a bit of cleanup on s...

How can I pad a variable with spaces or other characters?
If you need to pad a ColdFusion variable with spaces then you can use the build in rjustify() and lj...

How do I alternate row colors in a table?
Two functions are used in one expression which allow for a clean implementation of alternating row c...

How do I create a tag cloud from a query?
A tag cloud is a list of tags where size and color reflects popularity- the more often a tag is used...

How do I display query results in an N-column table layout?
Displaying query information in a N-column table can be done with just a bit of logic. This first bi...

How do I force a file to download instead of displaying inline in IE, Firefox and other browsers?
You can force a file to download by using a combination of the <cfheader> and <cfcontent>...

How do I output a query result set grouped by a specific field?
To generate this type of display, there are two key things to note in the code sample below. First,...

How to serve pictures from a database
You are building a web application for a Human Resources department. One part of this application is...