Title: css selector for sticky-element
Last modified: April 22, 2017

---

# css selector for sticky-element

 *  [Eve Fo](https://wordpress.org/support/users/eve-fo/)
 * (@eve-fo)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/)
 * Hi
    First of all – thank you for the plugin. I like to add an image once the 
   element is sticky (which appears only after the element is sticky and not before).
   Can you please tell me which selector i have to use in css?
 * Thank you
    Eve

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

 *  [Senff – a11n](https://wordpress.org/support/users/senff/)
 * (@senff)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9057514)
 * Hi, thanks for trying my plugin. 🙂
 * Without seeing your site, I won’t be able to tell you for sure which selector
   you need to use, but in general, you could try `.sticky-element-original:not('.
   sticky-element-active')` in order to target the element when it’s sticky.
 *  Thread Starter [Eve Fo](https://wordpress.org/support/users/eve-fo/)
 * (@eve-fo)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9058563)
 * Dear Mark
 * Thank you for your answer. unfortunately that doesn’t work.
    The website is [https://everontravel.ch/](https://everontravel.ch/)
   and the sticky part is the main menu (selector #main-menu)
 * Thanks for your help
    Eve
 *  [Senff – a11n](https://wordpress.org/support/users/senff/)
 * (@senff)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9074878)
 * Apologies for the delay!
 * From what I can see, you already managed to make it work through another method.
   Is that correct or do you still need help with this?
 *  [iantresman](https://wordpress.org/support/users/iantresman/)
 * (@iantresman)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9113409)
 * I don’t think that the :not() selector is supported when you chain CSS classses.
 * It would be extremely useful to be able to select an active sticky element. Perhaps
   the “sticky-element-active” class could be changed to “.sticky-element-stuck”(
   or similar) so that the element could easily selected. It’s something I would
   find very useful right now!
    -  This reply was modified 9 years ago by [iantresman](https://wordpress.org/support/users/iantresman/).
 *  [iantresman](https://wordpress.org/support/users/iantresman/)
 * (@iantresman)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9113774)
 * I think this does the trick:
 * .sticky-element-active + .mySelectorName
 *  [Senff – a11n](https://wordpress.org/support/users/senff/)
 * (@senff)
 * [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9114543)
 * > It would be extremely useful to be able to select an active sticky element.
   Perhaps the “sticky-element-active” class could be changed to “.sticky-element-
   stuck” (or similar) so that the element could easily selected. It’s something
   I would find very useful right now!
 * Definitely a great idea — I’m going to enable something like this in the next
   update of the plugin. 🙂

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

The topic ‘css selector for sticky-element’ is closed to new replies.

 * ![](https://ps.w.org/sticky-menu-or-anything-on-scroll/assets/icon-256x256.gif?
   rev=2564941)
 * [Sticky Menu & Sticky Header](https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/)
 * [Active Topics](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Senff – a11n](https://wordpress.org/support/users/senff/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/css-selector-for-sticky-element/#post-9114543)
 * Status: not resolved