<table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="border:2px solid #ffffff; padding: 8px 10px; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; text-decoration:none;"> <h3 style="color:#FFFFFF;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-style:normal;font-weight:bold;line-height:150%;letter-spacing:2px;text-decoration:none;text-align:center;"> <a alias="" conversion="false" data-linkto="https://" href="google.com" style="color:#ffffff;text-decoration:none; " title="Book Appointment"> <span>BOOK AN APPOINTMENT<br> TO VISIT US TOMORROW</span></a> </h3> </td> </tr> </table> No matter where I add the styling for border, it always wraps the entire cell, not the cell content itself. Here's how it is with the code:If I add it on the span element, it breaks the border entirely, like this:Here's how I need it to be:What am I doing wrong here?
4 Réponses :
Mettez la bordure sur le p> h3 code> et le faire
inline-block code>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding: 8px 10px; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; text-decoration:none;">
<h3 style="color:#FFFFFF;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-style:normal;font-weight:bold;line-height:150%;letter-spacing:2px;text-decoration:none;text-align:center;">
<a alias="" conversion="false" data-linkto="https://" href="google.com" style="color:#ffffff;text-decoration:none; " title="Book Appointment">
<span>BOOK AN APPOINTMENT<br>
TO VISIT US TOMORROW</span></a>
</h3>
</td>
</tr>
</table>
Il y a beaucoup de solution pour votre problème: On consiste à ajouter un div autour de votre contenu de la cellule comme suit:
p>
<table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="border:2px solid #ffffff; padding: 8px 10px; border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; text-decoration:none;"> <div class="contour"> <h3 style="color:#FFFFFF;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-style:normal;font-weight:bold;line-height:150%;letter-spacing:2px;text-decoration:none;text-align:center;"> <a alias="" conversion="false" data-linkto="https://" href="google.com" style="color:#ffffff;text-decoration:none; " title="Book Appointment"> <span>BOOK AN APPOINTMENT<br> TO VISIT US TOMORROW</span></a> </h3> </div> </td> </tr> </table>
Div's ne fonctionne pas correctement sur tous les clients de messagerie (Outlook ignore bloc d'affichage code> et
inline-block code> de divs). Le
A code> peut fonctionner correctement.
Ne pas styles la table, styez le contenu et simplifiez votre balisage:
<td> <a alias="" conversion="false" data-linkto="https://" href="google.com" style="display:inline-block;border:2px solid #ffffff; padding: 8px 10px;color:#FFFFFF;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-style:normal;font-weight:bold;line-height:150%;letter-spacing:2px;text-decoration:none;text-align:center;" title="Book Appointment"> BOOK AN APPOINTMENT<br> TO VISIT US TOMORROW</a> </td>
Ceci est assez simple et fonctionnera de manière cohérente sur tous les clients de messagerie.
ligne unique de texte strong>: p> sauf si vous avez besoin du bonne chance. p> p>
code> pour les lecteurs d'écran, je suggère de le supprimer. P>
Merci pour l'aide! Il semble fonctionner en effet, mais seulement des perspectives sépare les frontières pour eux semble. Je verrai si je peux comprendre celui-là moi-même.
@Rain mes excuses. J'ai oublié Outlook en fait cela à un href avec deux lignes de texte. J'ai donc révisé ma réponse et l'avez testé dans Litimus. Les deux lignes de texte reçoivent une perspective beaucoup plus proche de la façon dont vous le souhaitez.
Impossible d'exécuter le code sur jsfiddle ou si tellement extrait, vérification des pls