Page 1 of 1

image within anchor not following defined style

PostPosted: Mon Aug 10, 2020 10:59 am
by Andy
Hi Clifford,
I am using xml to populate a text field. I want each paragraph of the text to start with an image, like an illuminated letter. A "float: left;" style does this. I also need the image to be clickable, but when I wrap it in an anchor it expands to take up the full width of the text field. Here is what I am using. What's wrong? Thanks for your help, Andy

<page>
<config delay="">
</config>

<wtext>
<htmlText>
<![CDATA[
<p><a href="#" id="first"><img src="../media/T.gif" alt="T" style="float: left;" /></a>
<span id="w1.1">he quick red fox...</span>
</p>
]]>
</htmlText>
</wtext>
<first>
<pgStyleObject>
{ theStyle : 'float',
propVals : 'left' }
</pgStyleObject>

<function name="myClick" event="click" params="e">
<![CDATA[
tbfunction_pgTBObjSet( "wtext", "user", 1);
]]>
</function>
</first>
</page>

Re: image within anchor not following defined style

PostPosted: Mon Aug 10, 2020 5:46 pm
by Clifton
Here is an quick mockup I put together with seems to follow what you are trying to do. You can compare the source code with yours to see where you ran into problems.

Re: image within anchor not following defined style

PostPosted: Tue Aug 11, 2020 8:51 am
by Andy
I saw what I was missing and now it works perfectly. Thanks so much!