I find lots of references to this problem going back a couple of years, but no definitive solution. Is button alignment just broken?
1) Common symptom, but a million different causes. So there’s not one “definite solution” — what worked for someone may not work for you (because of different root causes).
2) The design/presentation/appearance of your site is, by and large, the job of your active theme. WordPress may indeed introduce a feature that may cause something in your theme (or plugin) to break, but it’s still the theme’s job to address the problem.
3) To get your alignment working, go to APPEARANCE => CUSTOMIZE => ADDITIONAL CSS, add the following, and hit PUBLISH:
.is-layout-flex {
display: flex;
}
(If you have something else in there, put this at the very end.)
Standing by for feedback.
Well that actually seems to work in my case, and it doesn’t appear to have broken anything else. So I rank this in the top 2% of WP fixes.
Of course I’d rather have found the root cause, and not just thrown more CSS into the hopper (what’s “flex” anyway?), but that’s probably beyond my understanding at present.
Thanks George!
“Flex” is a CSS layout model. If your theme has element class attribute “is-layout-flex” and does not declare it display: flex;, it’s apparently some kind of oversight, because declaring flex alone doesn’t accomplish much without other supporting declarations, which are apparently already in place. So that’s the root cause you and George just fixed, a theme oversight.
Yes, “display:flex” seemed scarily generic. The theme is old, and the buttons used to align properly, but who knows. As a former software developer I really dislike the layered aspect of WP – everything’s declarative, not procedural, fingers pointed in all directions, no obvious way to debug a problem. I suppose if I had serious knowledge of CSS I’d at least know where to look.
Thanks for the insights.