Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yahoo! Mail HTML Email Alignment Issue

I work on HTML email campaign builds on a daily basis and in the past 24 hours I've seen all of my emails aligning left. This includes the email campaigns I've built previously (which were tested in Yahoo! Mail and used to align center).

Has anyone else come across this? Any ideas what is causing it and whether there is a fix that can be added?

The standard coding used is tables with align center. This now doesn't work and all tables align left it seems.

like image 746
Ed Johnson Avatar asked May 15 '14 11:05

Ed Johnson


People also ask

How do I change Yahoo Mail format to HTML?

Select Settings > More Settings and choose Switch to Basic Mail. To change back, click Switch to the newest Yahoo Mail in the upper-right corner of the Basic Mail screen.

How do you center align an email in HTML?

Try the following: Wrap your content in another table with style="table-layout: fixed;" and align=“center”.

Does Yahoo Support HTML?

Yahoo Mail supports both plain text and rich text (HTML) email composition. There are benefits and detriments for each method, but if you want to use stylized text and inline images, your email will need to be HTML-based.


2 Answers

I've found a solution for this.

On the outer-most 100% width and centrally aligned table add this code:

style="table-layout: fixed;"

This should fix it.

like image 59
Ed Johnson Avatar answered Oct 14 '22 04:10

Ed Johnson


Add a class to the style block in the head of the email.

.table-center { table-layout: fixed; margin: 0 auto; }

Add this class to the outermost table to get the body centered in the window. Then add it to descendant tables as needed for center alignment.

like image 38
rojobuffalo Avatar answered Oct 14 '22 04:10

rojobuffalo