Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Using Last Class in NextGEN Gallery

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34161
    realph
    Participant

    I’m trying to add a “last” class on the end of every fourth thumbnail for styling.

    Here’s the code:

    Any help would be appreciated.

    Thanks in advance.

    #116978
    Almdudler09
    Participant

    Put this in your gallery-caption.php


    $count = 0;
    ?>



    pid ?>" class="ngg-gallery-thumbnail-box" style ?> >
    " > imageURL ?>" title="description ?>" thumbcode ?> > hidden ) { ?> alttext ?>" alt="alttext ?>" src="thumbnailURL ?>" size ?> /> caption ?>
    hidden ) continue; ?>
    columns > 0 && ++$i % $gallery->columns == 0 ) { ?>





    #116980
    Almdudler09
    Participant

    or just use

    
    $count = 0;
    ?>


    And this is your class:

     id="" 

    and this

     



    $count++;
    ?>

    #116981
    Paulie_D
    Member

    That seems complicated. Can’t you use nth-of-type?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.