xsl-list
[Top] [All Lists]

alternate background color for <tr>

2005-05-18 06:43:16
Following script I am using for background color for
table row
<xsl:template name="colorTemplate">
        <!-- Colors alternate rows differently to ease
readability without grid lines -->
        <xsl:if test="position() mod 2 = 0">
                <xsl:text disable-output-escaping = "yes">
                        &lt;tr style="background-color: #EEEEEE;
border-top: thick solid black;" &gt;
                </xsl:text>
        </xsl:if>

        <xsl:if test="position() mod 2 = 1">
                <xsl:text disable-output-escaping = "yes">
                        &lt;tr style="background-color: #FFFFFF;
border-top: thick solid black;" &gt;
                </xsl:text>
        </xsl:if>
</xsl:template>
........................
However, baccause of multiple for loops I am not
getting desired bahaviour. Is there any otherway of
achieving same.

regards,
Ranjan


                
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>