Title: Support for custom class?
Last modified: August 30, 2016

---

# Support for custom class?

 *  Resolved [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * (@noahj-champion)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/support-for-custom-class/)
 * Hi,
 * I would like to style the sticky content when it is stuck to the browser only,
   but there is not custom class to only apply the css when the content is sticky.
 * Can you add support for that?
 * Example:
    – Adding box shadow css to the sticky content when it is stuck, but
   not having that box shadow applied when the content in on the page.
 * Thoughts?
    – Not sure if that can be done.
 * [https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/](https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/)

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

 *  [Senff – a11n](https://wordpress.org/support/users/senff/)
 * (@senff)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/support-for-custom-class/#post-6752342)
 * The plugin’s functionality is basically as follows.
 * First, an invisible copy of the sticky element is created. This copy is basically
   the same as the original, with the main difference that it has a class called“
   cloned”.
 * This element becomes visible when the original hits the top of the screen, so
   at that moment, the original is replaced by the copy.
 * Hence, if you want to add styles to the element only when it’s sticky, you can
   target this by simply using the “.cloned” class. Something like:
 *     ```
       .cloned {
          box-shadow: 0 0 10px #000;
       }
       ```
   
 * Hope this helps!
 *  Thread Starter [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * (@noahj-champion)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/support-for-custom-class/#post-6752359)
 * Hi,
 * Works perfectly.
 * Maybe you could add this to the documentation?
    – Or even just add a link to 
   this thread. – That is just if you see fit. – I’m fine now with what you provided
   me.

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

The topic ‘Support for custom class?’ 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/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [custom class](https://wordpress.org/support/topic-tag/custom-class/)
 * [request](https://wordpress.org/support/topic-tag/request/)

 * 2 replies
 * 2 participants
 * Last reply from: [noahj-champion](https://wordpress.org/support/users/noahj-champion/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/support-for-custom-class/#post-6752359)
 * Status: resolved