IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

Template E-mail - Impossible d'afficher une image en background


Sujet :

CSS

  1. #1
    Candidat au Club
    Homme Profil pro
    Webmarketer
    Inscrit en
    Mars 2015
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmarketer
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2015
    Messages : 6
    Points : 3
    Points
    3
    Par défaut Template E-mail - Impossible d'afficher une image en background
    Bonjour à tous,

    J'ai essayé de coder un template e-mail assez simple pour pouvoir envoyer mes e-mails mais j'ai un soucis avec le footer:
    impossible d'afficher une image en background. En localhost, mon template s'affichait parfaitement par contre, quand j'essaie d'envoyer un mail, l'image de fond du footer ne s'affiche pas.

    Pouvez-vous m'aider?

    Voici mon code:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    <!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>
     
        <!-- Define Charset -->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     
        <!-- Define Viewport -->
        <meta name="viewport" content="width=device-width"/>
     
            <title>Web-Skills</title>
     
            <!-- Template Styles -->
            <style type="text/css">
     
                /* Reset Styles
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                */
                body, 
                #body-table, 
                #body-cell { 
                    height: 100% !important; 
                    margin: 0; 
                    padding: 0; 
                    width: 100% !important; 
                }
     
                table { 
                    border-collapse: collapse; 
                }
     
                a {
                    color: #eb3b3b; 
                    text-decoration: underline;
                }
     
                img, 
                a img {                         
                    border: 0;
                    line-height: 100%;
                    outline: none;
                    display: block;
                    text-decoration: none;
                    vertical-align: top;
                }
     
                h1, 
                h2, 
                h3, 
                h4, 
                h5, 
                h6 { 
                    margin: 0; 
                    padding: 0;
                    -webkit-font-smoothing: antialiased;
                }
     
                p { 
                    margin:  1em 0; 
                }
     
     
                /* Client Specific Styles
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                */
                .ReadMsgBody { 
                    width: 100%; 
                } 
     
                .ExternalClass { 
                    width: 100%; 
                } /* Force Hotmail/Outlook.com to display emails at full width. */
     
                .ExternalClass, 
                .ExternalClass p, 
                .ExternalClass span, 
                .ExternalClass font, 
                .ExternalClass td, 
                .ExternalClass div { 
                    line-height: 100%; 
                } /* Force Hotmail/Outlook.com to display line heights normally. */
     
                table, td {
                    mso-table-lspace: 0pt; 
                    mso-table-rspace: 0pt; 
                } /* Remove spacing between tables in Outlook 2007 and up. */
     
     
                td {
                    font-size: 0;
                    line-height: 100%;
                }
     
                #outlook a { 
                    padding: 0; 
                } /* Force Outlook 2007 and up to provide a "view in browser" message. */
     
                img {
                    -ms-interpolation-mode: bicubic; 
                } /* Force IE to smoothly render resized images. */
     
                body, 
                table, 
                td, 
                p, 
                a, 
                li, 
                blockquote { 
                    -ms-text-size-adjust: 100%; 
                    -webkit-text-size-adjust: 100%; 
                } /* Prevent Windows- and Webkit-based mobile platforms from changing declared text sizes. */   
     
     
                /* Theme Styles
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                */
                body,
                #body-table {                
                    background: #fcfcfc;
                }
     
                body,            
                div {
                    color: #919191;
                    font-size: 12px;
                    line-height: 18px;
                    font-family: Arial, sans-serif;
                }
     
                h1, h2, h3, h4, h5, h6 {
                    color: #919191;
                    font-family: Arial, sans-serif;
                    font-weight: bold;
                }
     
     
                /* Layout Styles
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                */
                /* Template Wrapper */
                #template-wrapper {
                    width: 600px;
                    border: 0;
                }
                    .template-wrapper-cell {                   
                        padding-top: 40px;
                        padding-bottom: 40px;
                    }
     
                /* Email Body */
                #email-body {                                
                    border: 1px solid #e1e1e1;
                    overflow: hidden;
                    -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 3px;
                      -moz-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 3px;
                      box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 3px;
                }
     
                /* CONTENT STYLES */
                #main-header {}
     
                #main-content {
                    background: #fcfcfc;
                }
                    .main-content-cell {
                        padding: 15px;
                    }
     
                #main-footer {
                  background-image:url("http://www.web-skills.be/email/images/footer-web-skills-background.jpg");                  
                }
                    #main-footer,
                    #main-footer div {
                        color: #fff;
                        line-height: 14px;
                    }
                    #main-footer a {
                        color: #eb3b3b;
                    }
                    .bottom-footer-cell {
                        padding-left: 10px;
                        padding-right: 15px;
                        padding-bottom: 10px;
                    }
     
                    .social-media-wrap {
                        padding-right: 15px;
                    }
                    .social-media {
                        width: 82px;
                    }
                    .contact-address {
                        width: 120px;
                    }
                    .badge-container {
                        width:144px;
                    }
     
     
     
            </style>
     
        </head>
     
        <body>
     
            <!-- START BODY TABLE -->      
            <table border="0" cellpadding="0" cellspacing="0" width="100%" id="body-table">
                <tr>
                    <td align="center" valign="top" class="body-table-cell">
     
                        <!-- START Template -->
                        <table border="0" cellpadding="0" cellspacing="0" width="564" id="template-wrapper">
                            <tr>
                                <td align="center" valign="top" class="template-wrapper-cell">
     
                                    <!-- START Email Body -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="email-body">
                                        <tr>
                                            <td align="center" valign="top" class="email-body-cell">
     
                                                <!--// READY SET GO \\-->
                                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
     
                                                    <tr>
                                                        <td align="center" valign="top" class="container">
     
                                                            <!-- START HEADER -->
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%" id="main-header">
                                                                <tr>
                                                                    <td align="center" valign="top">
                                                                        <a href="http://web-skills.be" title="Web-Skills">
                                                                            <img src="http://www.web-skills.be/email/images/header-web-skills-mail.jpg" alt="Web-Skills" width="600" height="217" />
                                                                        </a>
                                                                    </td>
                                                                </tr>                                                        
                                                            </table>
                                                            <!-- END HEADER -->
     
                                                        </td>
                                                    </tr> 
     
                                                    <!-- ////////////////////////////////////////////////// -->
     
                                                    <tr>
                                                        <td align="center" valign="top" class="container">
     
                                                            <!-- START MAIN CONTENT -->
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%" id="main-content">
                                                                <tr>
                                                                    <td align="left" valign="top" class="main-content-cell">
                                                                        <div>
                                                                            Bonjour
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <!-- END MAIN CONTENT -->
     
                                                        </td>
                                                    </tr>
     
                                                    <!-- ////////////////////////////////////////////////// -->
     
                                                    <tr>
                                                        <td align="center" valign="top">
     
                                                            <!-- START FOOTER -->
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%" height="166" id="main-footer">
                                                                <tr>
                                                                    <td align="center" valign="top" class="top-footer-cell">
     
                                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                            <tr>
     
     
     
                                                                                <td align="right" valign="top" class="social-media-wrap">
     
                                                                                    <table border="0" cellpadding="0" cellspacing="0" width="82" class="social-media">
                                                                                        <tr>
                                                                                            <td align="right" valign="top">
                                                                                                <a href="https://plus.google.com/u/0/b/114125361074651668553/+Web-skillsBe" title="Google+">
                                                                                                    <img src="http://www.web-skills.be/email/images/googleplus.jpg" alt="Google+" width="32" height="32" />
                                                                                                </a>
                                                                                            </td>
     
                                                                                            <td align="right" valign="top">
                                                                                                <a href="https://twitter.com/Web_Skills" title="Twitter">
                                                                                                    <img src="http://www.web-skills.be/email/images/twitter.jpg" alt="Twitter" width="32" height="32" /> 
                                                                                                </a>
                                                                                            </td>
     
                                                                                            <td align="right" valign="top">
                                                                                                <a href="https://www.facebook.com/webskillsbe">
                                                                                                    <img src="http://www.web-skills.be/email/images/facebook.jpg" alt="Facebook" width="32" height="32" />
                                                                                                </a>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
     
                                                                                </td>
                                                                            </tr>
                                                                        </table>
     
                                                                    </td>
                                                                </tr>
     
                                                                <tr>
                                                                    <td align="left" valign="top" class="bottom-footer-cell">
     
                                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                            <tr>
                                                                                <td align="left" valign="top" class="contact-address">
                                                                                    <div>
                                                                                        <b>Web-Skills</b><br /><br />
                                                                                        <small>
                                                                                            Rue Léon Henrard, 10 <br />5550 Alle-sur-Semois <br /><br />
                                                                                            +32 477 68 05 51 <br />
                                                                                            <a href="http://web-skills.be/" title="Web-Skills">web-skills.be</a><br />
                                                                                            <a href="mailto:info@web-skills.be" >info@web-skills.be</a><br />
                                                                                        </small>
                                                                                    </div>
                                                                                </td>
     
                                                                                <td align="left" valign="bottom">
     
     
     
     
                                                                                </td>
                                                                            </tr>
                                                                        </table>                                                                    
     
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <!-- END FOOTER -->
     
                                                        </td>
                                                    </tr>
     
     
                                                </table>
                                                <!--// FINISH LINE \\-->
     
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- END Email Body -->                                                             
     
                                </td>
                            </tr>
                        </table>
                        <!-- START Template -->
     
                    </td>
                </tr>
            </table>
            <!-- END BODY TABLE -->
     
        </body>
    </html>
    Merci d'avance pour votre aide précieuse.

  2. #2
    Membre régulier Avatar de DezMax
    Homme Profil pro
    Licence Informatique
    Inscrit en
    Décembre 2012
    Messages
    89
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 28
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Licence Informatique

    Informations forums :
    Inscription : Décembre 2012
    Messages : 89
    Points : 115
    Points
    115
    Par défaut
    Je peux te dire une chose c'est que tu te compliques la vie avec une div contenant ton image au lieu de toute ces découpes sa serait beaucoup plus facile à comprendre un petit conseil passe ton image entière sans la découper dans une div et tu verras sa sera beaucoup plus simple et tu n'auras certainement plus ton problème de footer.
    --//CODE//--

  3. #3
    Candidat au Club
    Homme Profil pro
    Webmarketer
    Inscrit en
    Mars 2015
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmarketer
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2015
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    Merci pour le conseil. Par contre, comment puis-je faire pour mettre images pour les réseaux sociaux (avec des liens) sur cette image?

    Merci d'avance pour ton aide,
    Jonathan

  4. #4
    Invité
    Invité(e)
    Par défaut
    Bonjour,

    1/ l'utilisation de <table> pour de la mise en page ne se fait plus depuis le siècle dernier.
    D'autant que là, tu n'as pas lésiné !

    2/ s'agissant du contenu d'un email, affiché dans la boite de messagerie du receveur, il est inutile d'y mettre les balises <html>,<head> (et tout ce que ça contient),<body>.

    3/ certaines boites de messagerie supprime purement et simplement tout style CSS autre que "inline".
    Les background-image aussi.

    Il vaut mieux utiliser des images (découpées, éventuellement) avec des liens.
    Et/ou revoir la mise en page pour ne pas superposer texte et image.

    Une autre solution à creuser et la position absolute; pour l'image.
    Ce qui permettrait au contraire de superposer texte et image.

Discussions similaires

  1. Réponses: 2
    Dernier message: 28/02/2015, 23h46
  2. Impossible d'afficher une image avec cvShowImage
    Par milanoran dans le forum OpenCV
    Réponses: 1
    Dernier message: 09/11/2010, 12h04
  3. impossible d'afficher une image?!
    Par G4uthier dans le forum Silverlight
    Réponses: 13
    Dernier message: 27/07/2009, 17h20
  4. [MySQL] impossible d'afficher une image avec firefox
    Par keithsize dans le forum PHP & Base de données
    Réponses: 6
    Dernier message: 15/06/2009, 22h20
  5. Impossible d'afficher une image sur une page ASP.Net
    Par Jean-Claude Dusse dans le forum ASP.NET
    Réponses: 2
    Dernier message: 31/01/2009, 21h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo