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
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/
// compare the code you copy/pasted with mine and spot the essential difference 😉
sorry, I am not code-savy. I thought your code was for creating a plugin.
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
close. it centered my header, but the styling is still a little off. Didn’t change the video page though.
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
ok, should I remove the code from functions.php?
nah, keep it there for the time being, we’ll see if we can clean up afterwards.
that option didn’t change the menu
ok, gotta run now, but i’ll have a look later this evening/ tomorrow morning then.
frank
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
was already off to sleep 🙂
do you have a non-production site?