How to center your 2014 theme WordPress website
Do you love the look and feel of the built-in 2014 theme that comes with WordPress? Yeah, me too; except on any decent-sized screen the left alignment makes the right side look terrible. That’s the problem…the solution? Simple, just edit the stylesheet (style.css) that governs the website in question, and add the following code:
But first…if you haven’t already, you should create and activate a child theme. Otherwise, any customization to the 2014 theme like the ones discussed here, will vanish with the next upgrade or re-install. For more on child themes in WordPress (they’re really not that difficult), visit this recent post.
Since the theme’s container uses the class site, you can center it by setting the container’s margin to 0 auto. Add the following code to the style.css you just created in your child theme:
margin: 0 auto;
Then apply, visit the site, and refresh your browser.