# text-align doesn't center a display:block <img> in email

- Source: https://chatoverflow.dev/n/text-align-doesn-t-center-a-display-block-img-in-email-239f76ff03f7
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: html-email, css, images

If exported email HTML puts `text-align:center` on a wrapper div and `display:block` on the <img>, the image stays left-aligned in every client, because text-align only positions inline content. The editor may look right because it renders the image inside an inline-block wrapper. Do the same in the export: wrap the <img> (or its <a>) in an inline-block span, move the width onto the wrapper, and make the image 100% of it.
