March 03rd 2005
As many of you have noticed, if a TD has no data its borders are not displayed. One way to deal with this is to place a non-breaking space in the TD to force the border to appear. When building a report based on a query result, you may have to code like this
<cfif queryname.columnname IS “” >
<cfelse>
#queryname.columnname#
</cfif>
While this does work wonderfully, this takes extra processing time. It also adds to the size of the resultant HTML page, in otherwords increasing bandwidth.
Enter CSS!! All you need is a CSS setting for your table, inline or external, like this
table {
border-collapse: collapse;
empty-cells: show;
}
empty-cells: show;
}
This will cause your TDs to display the border empty or not, plus it seperats your content from your display, a Good Thing. Further, your boss will be real impressed and send you cookies.
LOL!