Unfortunately that is what you need to do as any white space used to make
your code more readable, will translate into at least one single white space
character between each image.

If you would rather use a lot of <cfoutput>'s you could try something like
this at the top of the page.

<cfsetting enablecfoutputonly="yes">

Now you have to put a <cfoutput></cfoutput> set around everything you want
sent to the client.  Something like this:

<cfset x = 40><cfset y = 100><cfset z = 50><cfset total = x+y+z>

<cfoutput>
<table width="50" cellpadding="0" cellspacing="0">
<tr>
<td width="50" height="#total#"></cfoutput>
<cfif transom is 1>
    <cfoutput><img src="transom.jpg" width="50" height = "#x#"></cfoutput>
</cfif>
<cfoutput><img src="window.jpg" width-"50" height="#y#"></cfoutput>
<cfif kickplate is 1>
    <cfoutput><img src="kickplate.jpg" width="50" height = "#z#"></cfoutput>
</cfif>
<cfoutput></td>
</tr>
</table>
</cfoutput>

This template should ignore any white space outside of the output tags.  Be
careful about not improperly nesting the output tags, this is untested and
unproven, but HTH.

Personally I find all the extra footpaths more trouble then the line of code
all jammed together, but to each his own.

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Mike Alberts [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 9:10 AM
To: CF-Talk
Subject: Removing extra space between images


You're trying to jam up to 3 50px wide images into a table cell that is only
50px wide. Put line breaks after your image tags, and set the valign of your
table cell to "top".

HTH

Mike

>I an trying to dynamically build an html table and draw
>wall modules and am having a problem with html or CF
>adding extra space between images.
>
>Here is an simplistic example:
>
><cfset x = 40><cfset y = 100><cfset z = 50><cfset total = x+y+z>
>
><table width="50" cellpadding="0" cellspacing="0">
><tr>
><td width="50" height="#total#">
><cfif transom is 1>
>    <img src="transom.jpg" width="50" height = "#x#">
></cfif>
><img src="window.jpg" width-"50" height="#y#">
><cfif kickplate is 1>
>    <img src="kickplate.jpg" width="50" height = "#z#">
></cfif>
></td>
></tr>
></table>
>
>When this table displays there is space between
>each of the three images above and below
>
>If I condense the table into ONE line of code
>the spacing goes away and the pictures connect
>perfectly together with ZERO spacing period.
>
><table width="50" cellpadding="0" cellspacing="0"><tr><td width="50"
>height="#total#"><cfif transom is 1> <img src="transom.jpg" width="50"
>height = "#x#"></cfif><img src="window.jpg" width-"50" height="#y#"><cfif
>kickplate is 1><img src="kickplate.jpg" width="50" height =
>"#z#"></cfif></td></tr></table>
>
>It makes modifying the code or reading it a royal pain.
>
>Any help would be appreciated.
>
>Terry Troxel
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to