non, c'est censé marcher. Tu lis tes mails avec quoi ?
Version imprimable
non, c'est censé marcher. Tu lis tes mails avec quoi ?
je lit les mail avec outlook,
si tu me donne ton adresse mail en MP je peut t'envoyer un mail via le formulaire :)
Ok. width n'est supporté que par les éléments table. Donc ça ne sert à rien de spécifier pour les div. Idem, il semble que le padding/margin soient mal supportés.
test un code tout bidon avec le minimum syndical et ensuite tu pourras ajouter les bordure, marges etc ;)
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 itemsString = '<div>'; itemsString += '<table style="width:100%;">'; for( var current in me.items ){ var item = me.items[current]; itemsString += '<tr>'; itemsString += '<td style="background-color:#E4B1B1; width:100px">' + item.name + '</td>'; itemsString += '<td style="background-color:#E4B1B1; width:200px">' + item.description + '</td>'; itemsString += '<td style="background-color:#F7E8E8; width:30px">' + item.price + '</td>'; itemsString += '<td style="background-color:#E4B1B1; width:30px">' + item.quantity + '</td>'; itemsString += '</tr>'; itemsString += '<tr>'; itemsString += '-----------------------------' + "\n"; itemsString += '</tr>';
salut désoler mais ne marche toujours pas.. j'ai envoyer avec ce que tu as mis pour avoir une base puis j'ai *2 les valeurs et je reçois le même mail .. :(
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 me.emailCheckout = function() { itemsString = '<div>'; itemsString += '<table style="width:100%;">'; for( var current in me.items ){ var item = me.items[current]; itemsString += '<tr>'; itemsString += '<td style="background-color:#E4B1B1; width:200px">' + item.name + '</td>'; itemsString += '<td style="background-color:#E4B1B1; width:500px">' + item.description + '</td>'; itemsString += '<td style="background-color:#F7E8E8; width:40px">' + item.price + '</td>'; itemsString += '<td style="background-color:#E4B1B1; width:40px">' + item.quantity + '</td>'; itemsString += '</tr>'; itemsString += '<tr>'; itemsString += '-----------------------------' + "\n"; itemsString += '</tr>'; } itemsString += '</table>'; itemsString += '</div>'; itemsString += '<table>'; itemsString += '<tr>'; itemsString += '-----------------------------' + "\n"; itemsString += '</tr>'; itemsString += '<tr>'; itemsString += 'Total: ' + me.currency + me.total + "\n"; itemsString += '</tr>'; itemsString += '</table>';
salut, j'espère que tu va bien ?
je me permet de te relancer sur mon problème en voyant que tu ne répond pas et que ce n'est pas de ton habitude ( temps de réponse dans la journée ou le jour d'après :) )
peut être que tu n'a pas de solution a me soumettre.. :)
j'espère que tu ne le prendra pas mal.
bonne journé
En effet, je pensais que c'était résolu :)
C'est Outlook 2007 ? De toute façon, Outlook c'est **** pour la compatibilité CSS. Il ne fait pas comme les autres clients mail et passe par le moteur de Word pour rendre le HTML :aie: Du coup, tu dois bricoler des choses à ta sauce, c'est la bête noire des développeurs.
Je n'ai pas vraiment de solutions miracles, il faut tester plusieurs syntaxes pour arriver à la bonne qui sera bien interprétée. (je plaisante, mais c'est quasi ça)
En effet, après avoir cherché un peu, on peut s'apercevoir que le CSS width (dans la balise style) n'est pas supporté par Outlook 2007 :aie:
Donc test directement en vieux HTML comme ça :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 itemsString = '<table width="360px" bordercolor="#000" border="1">'; for( var current in me.items ){ var item = me.items[current]; itemsString += '<tr>'; itemsString += '<td bgcolor="#E4B1B1" width="100px">' + item.name + '</td>'; itemsString += '<td bgcolor="#F7E8E8" width="200px">' + item.description + '</td>'; itemsString += '<td bgcolor="#E4B1B1" width="30px">' + item.price + '</td>'; itemsString += '<td bgcolor="#F7E8E8" width="30px">' + item.quantity + '</td>'; itemsString += '</tr>'; } itemsString += '</table>'; itemsString += '<table>'; itemsString += '<tr>'; itemsString += '<td>-----------------------------</td>'; itemsString += '</tr>'; itemsString += '<tr>'; itemsString += '<td>Total: ' + me.currency + me.total + '</td>'; itemsString += '</tr>'; itemsString += '</table>';
ps : un bon lien pour savoir ce que les différents clients mail supportent. Et un autre lien (Microsoft) pour voir les balises supportés par Outlook.
Bon courage !