I am building markup for an HTML email, however I can't seem to find a solution to prevent a word from breaking mid-word like this in iOS email client:
HTML:
<table class="row">
<tbody>
<tr class="mail-title">
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td>
<h1 class="center">YOUR ORDER 101 HAS BEEN DISPATCHED</h1>
</td>
<td class="expander"></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
CSS:
.mail-title h1 {
font-size : 18px;
text-transform : uppercase;
font-weight : normal;
word-wrap : none;
word-break : break-all;
}
I am using the Zurb Ink email framework, which is what the wrapper
, last
and expander
classes are for.
I'#ve had a look at this answer, which makes sense as Ink defaults to break-word
, but this doesn't work on iOS mail.
Add the following into your custom styles section of your template to override Ink's styling.
td {
word-break: break-word;
-webkit-hyphens: none;
-moz-hyphens: none;
hyphens: none;
border-collapse: collapse !important;
}
This answer is specific to those implementing email templates with Zurb Ink. So, it appears this is default Ink styling. See here: https://github.com/zurb/ink/blob/master/css/ink.css#L71
I changed the declaration of td
to be as below:
td {
word-break : normal;
border-collapse : collapse !important;
}
Fixed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With