Title: CSS ignored when plugin active?
Last modified: January 7, 2019

---

# CSS ignored when plugin active?

 *  Resolved [webworks](https://wordpress.org/support/users/webworks/)
 * (@webworks)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/css-ignored-when-plugin-active/)
 * Hi Frank – Nifty plugin as always – love the power up 😉
 * I’m setting up the referenced URL and have run into something strange.
 * I’m using this bit of css which prevents the “switch” part of a collapsible pre-
   header (white bar at top) In this case, we want the preheader static without 
   the collapse.
 *     ```
       #g1-preheader__switch { 
       	display: none; 
       }
       ```
   
 * This CSS hides the “switch arrow bar” as it should. But as soon as we activate
   autoptimize, the white “switch-bar” with right-arrow appears at top – leaving
   an extra tall white top margin.
 * This happens whether we do above-the-fold at criticalcss or not.
 * What can we do to make that css “stick” and still do our optimizing?
 * Thanks in advance –
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-ignored-when-plugin-active%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/css-ignored-when-plugin-active/#post-11061942)
 * Evening Heather 🙂
    you could try adding `#g1-preheader__switch` to the comma-
   separated CSS optimization exclude list or you could make it `display:none !important;`
   flag maybe?
 * hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘CSS ignored when plugin active?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [active](https://wordpress.org/support/topic-tag/active/)

 * 1 reply
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/css-ignored-when-plugin-active/#post-11061942)
 * Status: resolved