Title: Image Classes
Last modified: September 11, 2020

---

# Image Classes

 *  Resolved [eranariel](https://wordpress.org/support/users/eranariel/)
 * (@eranariel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/image-classes-2/)
 * Hi,
 * Is there a way to create two distinct classes of images in Foo Gallery to which
   I can assign different CSS filters?
 * I am attempting to apply two different hues to different images that when hovered
   upon will revert to their full color state. In the media library, I can add a
   unique class to an image, however within the foo gallery, I cannot see the class
   I have created.
 * Please advise and thanks in advance,
 * Eran
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimage-classes-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [fooplugins-support](https://wordpress.org/support/users/influxfooplugins/)
 * (@influxfooplugins)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/image-classes-2/#post-13410485)
 * Hi [@eranariel](https://wordpress.org/support/users/eranariel/),
 * Sorry for the delayed response.
 * Instead of adding a unique CSS class to the image, you can use the CSS nth-child
   selector as shown below:
 * .foogallery .fg-item:nth-child(2) img{
    filter: brightness(50%); }
 * The .foogallery is the CSS class that identifies the gallery. The .fg-item is
   the div container that contains the image in the  element. The nth-child selector
   will enable you to loop to the image in the .fg-item class you want in the order
   they appear in the gallery i.e. position 0, 1, 2.. or use code to affect the 
   images in odd or even position e.t.c. For more information on the nth-child selector
   [https://css-tricks.com/almanac/selectors/n/nth-child/](https://css-tricks.com/almanac/selectors/n/nth-child/).
 * If I may be missing something, let me know.
 * Kind regards,
    Blaise.
 *  [fooplugins-support](https://wordpress.org/support/users/influxfooplugins/)
 * (@influxfooplugins)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/image-classes-2/#post-13464273)
 * Hi [@eranariel](https://wordpress.org/support/users/eranariel/)
 * We haven’t heard from you in a while, so we presume the problem has been resolved
   and we’re closing this support ticket.
 * However, if you are still experiencing the problem, then please open a new support
   ticket and we’ll help you come up with a working solution.
 * Regards,
    Elvis.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Image Classes’ is closed to new replies.

 * ![](https://ps.w.org/foogallery/assets/icon-256x256.gif?rev=2602542)
 * [Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel](https://wordpress.org/plugins/foogallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [fooplugins-support](https://wordpress.org/support/users/influxfooplugins/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/image-classes-2/#post-13464273)
 * Status: resolved