The float:right is the culprit. An easier way to accomplish what you are
trying is to use a master container with two containers within it: 1 for the
image, 1 for the caption.

<div class="image-caption-container">
     
<div class="image">some image</div>

<div class="caption">
<span class="caption">some caption text</span>
</div>

</div>

Then apply your styles to the master container to position both the image
abd captio... And use the span tag's class attribute to control the font
color and such... It will clean up your code below quite nicely.

HTH,

Mike

> I have the following code. Everything works fine but when I
> output to the web page the first line appears to be right
> justified. I tried putting an align left in the <td> tag on
> the first line but that was even worse. I simply want to have
> a Image field with a caption text that is all data driven.
>
> <td width="600" height="375" valign="top" bgcolor="ffffff">
>           <cfoutput>
>             <h3>#getpage.header#</h3>
> <p>
> <cfif #getpage.image# NEQ ''>
> <div style="float:right;" >
> <table width="275">
>   <tr>
> <td width="5"></td>
> <td align="left"><img
> src="" border="0"><br>
> <cfset
> formattedcap=replace(#getpage.image_cap#,"#chr(10)#","<BR>","A
> LL")><font size="1" color="000066" >#formattedcap#
> </font>
> </td>
>   </tr>
> </table>
> </div>
> </cfif>
> <cfset
> formattedcontent=replace(#getpage.content#,"#chr(10)#","<BR>",
> "ALL")>#formattedcontent#
> </p>
> </cfoutput>
> <p>&nbsp;</p>   
> </td>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to