Problem with adding padding and border to an image
Posted: Fri Feb 07, 2014 4:24 pm
I'm trying to add padding and a border around images but cannot get my code to work correctly. The code is currently as follows:
So, if the outputclass is 'Border' I want an image with 5px padding with a 1pt border. However, the border is coming out as 5px thick. If I move the padding line to after the </xsl:attribute> line the padding and border are drawn correctly, but then all images have padding, which is not what I require.
Can anyone tell me what the problem is and how to fix it?
Thanks
Code: Select all
<xsl:attribute-set name="image">
<xsl:attribute name="border">
<xsl:if test="@outputclass='Border'">
<xsl:attribute name="padding"> 5px </xsl:attribute>
<xsl:attribute name="border"> solid 1pt blue </xsl:attribute>
</xsl:if>
</xsl:attribute>
</xsl:attribute-set>
Can anyone tell me what the problem is and how to fix it?
Thanks