Wednesday, June 17, 2009

Alternate Styling

Want to make alternate styling in a DataViewWebPart or ContentQueryWebPart? Here is the way:

<tr>
    <xsl:if test="position() mod 2 = 0">
        <xsl:attribute name="class">AlternatingClass</xsl:attribute>
    </xsl:if>

    <td ...>
    ...
</tr>

Where AlternatingClass: is the alternating class name that will be the value of the class attribute of the TR tag.

No comments:

Running Proxmox Inside Hyper-V on Windows 11: Nested Virtualization Lab Setup

I have a good PC at home with an Intel i9 12th Gen processor, 96GB RAM, and 1TB of unused disk storage. It’s our family PC for everyday use,...