Sto prendendo l'input dell'utente finale e lo inserisco in un'email HTML. Ma se l'utente finale immette un URL lungo o una parola veramente lunga, interrompe il mio layout HTML in Outlook 2010 estendendo la colonna o div oltre la larghezza specificata.Interrompe parole lunghe in html email in Outlook 2010
In Chrome, Firefox, IE7 + e Safari, posso usare style = "table-layout: fixed" per forzare le colonne della tabella a determinate larghezze. Ma Outlook 2010 lo ignora e la parola lunga spinge la larghezza della tabella oltre la larghezza fissa.
Con Div, in Chrome, Firefox, IE7 + e Safari, posso usare style = "word-wrap: break-word; overflow: hidden; width: 100px", per correggere la larghezza div. Ma in Outlook 2010, spinge il div out oltre la larghezza fissa.
Come posso ottenere outlook2010 per racchiudere la parola lunga e rispettare la larghezza fissa?
Ecco il mio codice HTML di esempio:
<!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>
</head>
<body>
<table width="400" style="table-layout: fixed" border="1">
<tr>
<td width="100">
yo
</td>
<td width="300">
Don't move me
</td>
</tr>
</table>
<table width="400" style="table-layout: fixed" border="1">
<tr>
<td width="100" style="word-wrap: break-word; overflow: hidden; width: 100px" border="1">
yoooooooooooooooooooooooooooooooooooooooooooooooooooooo
</td>
<td width="300">
Ya moved me
</td>
</tr>
</table>
<table width="400" border="1">
<tr>
<td width="100">
<div style="word-wrap: break-word; overflow: hidden; width: 100px" border="1">
yoooooooooooooooooooooooooooooooooooooooooooooooooooooo
</div>
</td>
<td width="300">
Ya moved me
</td>
</tr>
</table>
</body>
</html>
Una soluzione più semplice potrebbe essere quella di dividere l'ingresso/assetto con elipsis beond certa lunghezza –
@PaulSullivan si tratta di una soluzione di messaggistica, però, quindi sono davvero sperando di fornire l'intero testo del messaggio per l'utente finale – Hoppe
poi dividere la frase - Credo che il motore di rendering di Outlook non sia basato su standard (e probabilmente piuttosto non documentato su come forzarlo a fare ciò che si vuole - google "motore di rendering html di Outlook 2010" –