I try to send order confirmation and everything should be centered (i only post the part that fails being centered)
How can i center the cartItems.map part?
I played around with justify-content center, text-align center and more but it stuck at the left site...
mailgun()
.messages()
.send(
{
from: `abc@test.com`,
to: to,
subject: `Bestellbestätigung`,
html: `
<div
style="
max-width: 100vw;
min-height: 400px;
margin: auto;
background: orange;
"
>
<div style="justify-content: center;">
${cartItems.map((item) => {
return `
<div style="display: flex">
<div style="margin-right: 4px">${item.quantity}x</div>
<div style="margin-right: 4px">${item.name}</div>
</div>
`;
})}
</div>
</div>
`,
},
(error, body) => {
if (error) {
console.log(error);
} else {
console.log(body);
}
}
);
};