Blog posts - images won't center align

Topic summary

A user encountered an issue where blog post images wouldn’t center-align despite using the built-in alignment options in their Shopify store’s blog editor.

Problem: The standard center-align controls in the blog post editor were not working for images on the Academix Apparel blog.

Solutions Provided:

  • Option 1: Add CSS code (display: block; for .grid--article) to the theme.css file
  • Option 2: Insert custom CSS styling via a <style> tag in the theme.liquid file, placed above the </body> tag

Resolution: The user confirmed that one of the provided solutions successfully centered the images.

Both solutions involve editing the theme code directly rather than relying on the visual editor’s alignment tools. The fixes modify the CSS styling to override the default grid layout behavior that was preventing center alignment.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I am trying to edit out blog post to center align the images. I have tried clicking both the icons below and selecting the center-align option, but it does not center align the images.
Our page: https://academixapparel.com/blogs/news/evans-uniform-purchasing-guidelines

1 Like

Hello @JenniferLashua ,

Follow these steps:

  1. Go to Online Store → Theme → Edit code

  2. Open your theme.css file and paste the following code at the bottom:

.grid--article { 
    display: block;
}

Regards
Guleria

Hey @JenniferLashua

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

This worked! Thank you!!

Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

Is there a reason why Shopify doesn’t show me the code to copy? It’s empty.

Can you tell me your exact problem then I can provide you a code accordingly.

Best,
Moeed

It’s the exact same problem as the original poster made the thread for. I cannot see your answer that had code within the block to copy from.