Les Allergies
Alimentaires
Posez votre question Signaler

Mailing html sur fond noir

joachim - Dernière réponse le 2 juil. 2008 à 10:33
Bonjour,
J'envoie un mailing en html, avec une image, du texte en blanc, et un fond noir.
Le problème est que sur certains types de boîtes mails (notamment gmail et yahoo), l'image apparait correctement, mais le fond noir ne s'affiche pas. Ce qui empêche donc de lire le texte blanc (blanc sur blanc...)
Le test sur hotmail par contre est concluant : tout s'affiche correctement.
Auriez-vous la solution ?
Pour plus de précisions : le mail est envoyé à 20000 personnes depuis le plugin Mail It sur Filemaker pro 8.5 et voici le code html :
<!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" />
<title>IS THERE STILL A SPACE FOR A GLOBAL CRITIQUE ?</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<body>
<div>
<div align="right"><img src="cid:bk.gif@3C031C48.7833.1849.B811.E0A3A8E7CE79" width="34" height="20" /></div>
</div>
<div class="centrage">
<p align="center"><img src="cid:img.jpg@4D5BA9E8.BC42.9B44.B7AB.91637BFE5088" width="557" height="766" />"</p>
<p align="center"><span style="line-height:12 px; font-family:Arial, Helvetica, sans-serif; font-size:7pt; font-weight:normal; font-stretch:condensed; color:#FFFFFF">If you no longer wish to receive this kind of message, please return this message after writing “unsubscribe” in the subject field.</span></p>
</div>
</body>
</html>
merci !!
Lire la suite 

Mailing html sur fond noir »

10 réponses
Réponse
+1
moins plus
<!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" />
<title>IS THERE STILL A SPACE FOR A GLOBAL CRITIQUE ?</title>
</head>
<body style="background-color:#000">
<div>
<div align="right"><img src="cid:bk.gif@3C031C48.7833.1849.B811.E0A3A8E7CE79" width="34" height="20" /></div>
</div>
<div class="centrage">
<p align="center"><img src="cid:img.jpg@4D5BA9E8.BC42.9B44.B7AB.91637BFE5088" width="557" height="766" />"</p>

<p align="center"><span style="line-height:12 px; font-family:Arial, Helvetica, sans-serif; font-size:7pt; font-weight:normal; font-stretch:condensed; color:#FFFFFF">If you no longer wish to receive this kind of message, please return this message after writing “unsubscribe” in the subject field.</span></p>
</div>
</body>
</html> 
Ajouter un commentaire
Réponse
+0
moins plus
salut,

mets le style dans la balise.
<body style="background-color:#000">

Ajouter un commentaire
Réponse
+0
moins plus
Bonjour,

En regardant comment était traduit un mail HTML sur le webmail de gmail, j'ai cru comprendre que la balise <body> était simplement remplacée par une balise <div>.
Donc le style ne s'applique plus.
Par contre, si tu le places directement dans la balise : <body style='background-color:black'>, ça devrait marcher, non ?

Xavier
Ajouter un commentaire
Réponse
+0
moins plus
ok, j'essaierai bien, mais j'ai oublié de dire que je n'y connaissais rien.
Où je peux inclure ces lignes?

Merci en tous cas !!
Ajouter un commentaire
Réponse
+0
moins plus
Mais d'intuition, j'ai corrigé le code comme suit, et ça ne marche pas sur gmail non plus :

<!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" />
<title>IS THERE STILL A SPACE FOR A GLOBAL CRITIQUE ?</title>
<style type="text/css">
<body style='background-color:black'>
</style></head>

<body>
<div>
<div align="right"><img src="cid:bk.gif@3C031C48.7833.1849.B811.E0A3A8E7CE79" width="34" height="20" /></div>
</div>
<div class="centrage">
<p align="center"><img src="cid:img.jpg@4D5BA9E8.BC42.9B44.B7AB.91637BFE5088" width="557" height="766" />"</p>

<p align="center"><span style="line-height:12 px; font-family:Arial, Helvetica, sans-serif; font-size:7pt; font-weight:normal; font-stretch:condensed; color:#FFFFFF">If you no longer wish to receive this kind of message, please return this message after writing “unsubscribe” in the subject field.</span></p>
</div>
</body>
</html>
Ajouter un commentaire
Réponse
+0
moins plus
Mauvaise intuition ;)

Fais plutôt comme Dalida te propose (oui, j'ai bien vu que vos messages se sont croisés)
Ajouter un commentaire
Réponse
+0
moins plus
ok, j'ai copier le code de Dalida, et la bonne nouvelle c'est que ça fonctionne nickel sur gmail.

Par contre, ça ne fonctionne plus sur yahoo, ni sur hotmail (les images s'affichent, mais pas le fond noir). Et sur free, on voit rien du tout.
Ajouter un commentaire
Réponse
+0
moins plus
On m'a gentillement conseillé aussi ce code, qui ne marche toujours pas sur hotmail... Mais qui marche sur gmail et outlook !
(je parle du fond noir)

Que faire pour que ça marche chez tout le monde ?!!

<body style='background-color:black;color:white'>
<div style='width:100%; background-color:black;color:white'>
<div align="right"><img src="cid: bk.gif@3C031C48.7833.1849.B811.E0A3A8E7CE79" width="34" height="20" /></div>
</div>
<div class="centrage">
<p align="center"><img src="cid:img.jpg@4D5BA9E8.BC42.9B44.B7AB.91637BFE5088 " width="557" height="766" />"</p>

<p align="center"><span style="line-height:12 px; font-family:Arial, Helvetica, sans-serif; font-size:7pt; font-weight:normal; font-stretch:condensed; color:#FFFFFF">If you no longer wish to receive this kind of message, please return this message after writing "unsubscribe" in the subject field.</span></p>
</div>
</body>
Parasitor - 2 juil. 2008 à 10:33
Salut, j'ai viens d'avoir le même problème que vous.
Plutôt que de forcer le fond noir j'ai contourné le problème en créant une cellule sans bordure 100% x 100% de fond noir.
J'y insère le contenu original du mail html et le tour est joué :


$html_message .= "<table border=\"0\" width=\"100%\" height=\"100%\" bgcolor=\"black\"><tr><td width=\"951\" height=\"359\"><p>";

$html_message .= $TON_E_MAIL_ORIGINAL

$html_message .= "</p></td></tr></table></html>";
Ajouter un commentaire
Réponse
+0
moins plus
salut,

je mettrais des guillemets (") au lieu des apostrophes (').
Ajouter un commentaire
Ce document intitulé « mailing html sur fond noir » issu de CommentCaMarche (www.commentcamarche.net) est mis à disposition sous les termes de la licence Creative Commons. Vous pouvez copier, modifier des copies de cette page, dans les conditions fixées par la licence, tant que cette note apparaît clairement.
Dossier à la une
Passage au tout numérique : quel coût pour les particuliers ?