Can we use CSS Flexbox in HTML Emails?
Discussion started by someone anonymous
How good is the support for Flexbox in HTML Emails? Do you think all the layout issues would be solved if Email clients properly implement Flexbox?
3.4K+ developers have started their personal blogs on Hashnode in the last one month.
Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more
Though the support for
display property is good-ish, it's not supported in all the clients. So even if it works for you, you won't know where it breaks.
Honestly, even without flexbox support, most of the layout problems would be solved with simple-basic CSS3 support that is standard in all clients.
For now though, you're stuck with
<table> and CSS2 support for your layouts.
You can follow this cheatsheet to know what is supported and what is not: campaignmonitor.com/css/b
There is a lot of variation in styling support among different mail clients and the same has been discussed on hashnode at times. you'll get some good tips for email styling here:
Hope it helps! 😃
Short answer is NO, hell NO.
HTML in emails is somehow in a forgotten world and is about lots of years behind us. If you're trying to use flexbox as a responsive way to adapt your mails in different devices, well there's a framework for that called MJML hope it works for you.