Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Elad Lachmi 112 posts 144 karma points
    Mar 19, 2011 @ 19:04
    Elad Lachmi
    0

    Rows of three

    Hi,

    I want to take a group of nodes and list them as select items in rows of three.

    For the last box in each row (the third) I want to remove the right padding. I created a new css class just for this and I want to apply this css class to every third node.

    Any ideas of a good way to do this?

    Thank you!

    -Elad

  • Ernst Utvik 123 posts 235 karma points
    Mar 19, 2011 @ 21:09
    Ernst Utvik
    0
    <xsl:for-each select="$currentPage/child::* [@isDoc]">
     <div class="something">
      <xsl:if test="position() mod 3 = 0">
        <xsl:attribute name="class">something someotherclass</xsl:attribute>
      </xsl:if>
      Content of div
     </div>
    </xsl:for-each>

    Havent tested the code but something like this should work:)

  • Elad Lachmi 112 posts 144 karma points
    Mar 20, 2011 @ 07:36
    Elad Lachmi
    0

    Let me test that code for ya :)

    It works. Thank you!

  • Ernst Utvik 123 posts 235 karma points
    Mar 20, 2011 @ 11:22
    Ernst Utvik
    0

    Glad to help ;)

Please Sign in or register to post replies

Write your reply to:

Draft