I have added a code
block on top of my dynamic email template (code given below). It looks perfect in Preview mode, but entirely different when actual email is sent
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container {
position: relative;
text-align: center;
color: white;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 32px;
color: #000000;
font-weight: 600;
}
</style>
</head>
<body>
<div class="container">
<img src="http://cdn.mcauto-images-production.sendgrid.net/1714a3d54002df2a/a0f350e5-2a93-4de4-9d6b-a747ccb068a0/626x240.png" style="width:100%;">
<div class="centered">CA {{first_name}}</div>
</div>
</body>
</html>
What I am trying to achieve is some text in center of an image. Is there something wrong/missing in my code? Kindly guide me on this. Thanks!