Issue with GMail - Wrapping up Html email with unwanted PRE tag -


i trying send html email gmail. gmail internally wrapping html of email pre tag.

for ex: email contains below html

<html> <body>     <table>         <tr>             <td> test 1 </td>         <tr>      </table>     <table>         <tr>             <td> test 2 </td>         <tr>      </table>  </body> 

but gmail translates html in different way shown below

<pre><table>         <tr>         <td> test 1 </td>     <tr>  </table> <table>     <tr>         <td> test 2 </td>     <tr>  </table></pre> 

can me, how pre tag gets added in gmail?
problem pre tag has got styles coming gmail breaks , feel of email. below css.

.gs pre {   white-space: pre-wrap; } 

also, there way override above css change value of 'white-space' 'initial' instead of 'pre-wrap'? if possible, issue resolved.

any on above doubts appreciated.

@rde, absolutely right. gmail not wraps pre tag.

i figured out problem , solution too.

issue using adobe cq(content management tool) send emails. while sending emails entire html wrapping pre tag. due adobe cq mail api sends email. issue occurred me in email clients.

solution have wrapped pre tag outside entire html style "white-space:initial". when cq generates email, 2 pre tags now, one(outer pre tag) cq , one(inner pre tag) used wrap html. inner pre tag took priority on outer 1 , overrides styles causing issue. adding code better clarity

<pre style="white-space:initial">  html goes through cq </pre>...  

now once send email through cq final html this

<pre>     <pre style="white-space:initial">         html goes through cq     </pre> </pre> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -