Title: CSS issues
Last modified: August 24, 2016

---

# CSS issues

 *  Resolved [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/)
 * Hi,
    The js minification works perfectly. I am having issue making the css work.
   I can use the site without it, but with it on, my site would load in a much much
   faster speed. I want that faster speed. I have been adding and removing a lot
   of my css from the exclusion list. Going through this forum. Deleting new plugins,
   nothing is working. The issue is the the sub header menu is messed up, and my
   video page fails to load the play button, plus other minor css issues. Do you
   know what it could be? Or what I need to exclude?
 * [https://wordpress.org/plugins/autoptimize/](https://wordpress.org/plugins/autoptimize/)

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/css-issues-23/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/css-issues-23/page/2/?output_format=md)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182024)
 * very hard to say without seeing your site, but in CSS-issues can be caused as
   AO by default aggregates & externalizes inline CSS, which makes it loose it’s
   priority (inline beats external).
 * so you could remove all exclusions from CSS optimization and then force AO not
   to aggregate inline CSS by adding something like this (from autoptimize_helper.
   php_example) to your (child) theme’s functions.php (or better yet, a small helper
   plugin);
 *     ```
       add_filter('autoptimize_css_include_inline','ruddyred_ao_css_include_inline',10,1);
       function ruddyred_ao_css_include_inline() {
               return false;
       	}
       ```
   
 * If that doesn’t help, I can have a look at your site (with AO CSS optimization
   active) to see what’s happening.
 * frank
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182026)
 * Hi Frank,
 * I put the code in functions.php:
 *  // add_filter(‘autoptimize_css_include_inline’,’my_ao_css_include_inline’,10,1);
   
   function my_ao_css_include_inline() { return false; }
 * It didn’t work out, please check the video and see the header and video wrapper
   styling is off:
 * [http://www.thehautie.com/v/dy3G7p9jm/](http://www.thehautie.com/v/dy3G7p9jm/)
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182040)
 * // compare the code you copy/pasted with mine and spot the essential difference
   😉
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182042)
 * sorry, I am not code-savy. I thought your code was for creating a plugin.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182043)
 * no problem, just remove the double slash at the start of this line;
 *     ```
       // add_filter('autoptimize_css_include_inline','my_ao_css_include_inline',10,1);
       ```
   
 * Otherwise PHP considers the entire line as being comment and not code and the
   filter is not added really.
 * frank
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182044)
 * close. it centered my header, but the styling is still a little off. Didn’t change
   the video page though.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182045)
 * ok, focused on the menu for now. the problem is bootstrap.css is loaded from 
   an external domain, which means it’s not aggregated and it loaded after the autoptimized
   css. different possible solutions for that, but I would start trying with the“
   inline all css”-option (which will force the inline AO-css to take precedence
   over the external bootstrap-one).
 * frank
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182046)
 * ok, should I remove the code from functions.php?
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182047)
 * nah, keep it there for the time being, we’ll see if we can clean up afterwards.
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182048)
 * that option didn’t change the menu
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182050)
 * ok, gotta run now, but i’ll have a look later this evening/ tomorrow morning 
   then.
 * frank
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182051)
 * ok
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182074)
 * had a look, but css optimization appears to be off now so I can’t compare really.
   if you have a non-prod site where you can turn CSS-optimization on, then I could
   have a look there without it impacting your visitors?
 * frank
 *  Thread Starter [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * (@ruddyred)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182077)
 * It is turned on now
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [11 years ago](https://wordpress.org/support/topic/css-issues-23/#post-6182085)
 * was already off to sleep 🙂
 * do you have a non-production site?

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/css-issues-23/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/css-issues-23/page/2/?output_format=md)

The topic ‘CSS issues’ 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/)

 * 25 replies
 * 2 participants
 * Last reply from: [ruddyred](https://wordpress.org/support/users/ruddyred/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/css-issues-23/page/2/#post-6182099)
 * Status: resolved