Yahoo Email Background Color and Center Alignment

Yahoo ignores the wrapper table with 100% width and background color for email. The background color is displayed as white, and the content is aligned to the left and displays only the internal table set to 600 pixels. Previously tested emails also have the same problem. Any help in solving this problem would be greatly appreciated. The following is a sample Im code.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title></title>
<style type="text/css">
.ReadMsgBody {width: 100%;}
.ExternalClass {width: 100%;}
</style>
</head>
<body style="background-color:#000000; margin:0px; padding:0px;" bgcolor="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
<tr>
<td align="center" bgcolor="#000000" style="padding:20px;">
<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#1a1a1a">
    <tr>
        <td style="color:#FFFFFF;font-family:sans-serif;font-size:16px;line-height:22px; padding:20px; border:1px solid #cccccc;" align="left">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</td>
    </tr>
</table></td>
</tr>
</table>
</body>
</html>
+4
source share
2 answers

Add width: 1440px on what used to be with width = '600' for example:

        <td align="center" bgcolor="#000000" style="padding:20px; width: 1440px">

This will display your email content in the middle and not on the left side.

0
source

? , .

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

(AFAIK) , , 100%, .

-1

Source: https://habr.com/ru/post/1540793/


All Articles