ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

HTML code seems to divide page into 2 columns; why and how to fix?


My HTML code gives a strange response.  After the E-mail </script>, it seems to divide the page into 2 columns, ideas why and how to fix problem?

--- ---<h4 style="float:left; padding: 0px 15%">1. E-mail us at <script type="text/javascript"><!--
var name = "aaa"; //
var domain = ""; //
document.write('<a href=\"mailto:' + name + '@' + domain +
  '?subject=Interest%20in%20...' + '\">');
document.write(name + '@' + domain + '<\/a>');
// --></script></h4>

<!-- problem seems to start here. The 'xxx' lines below show in 'column 2', why and how to fix? The 'zzz' line is okay from there on. -->

<h4 style="float:left; padding: 0px 15%">2. Send us a letter.</h4>
<p style="text-align:center"><b>xxx<br>


<h2 style="text-align:center;"><i>zzz</i></h2>

The HTML parser in any email client is not nearly as sophisticated as a standard browser is. Better use HTML 4 markup to create/generate messages with HTML styling.

Also, if you think that browsers can be incompatible, because of different HTML/CSS interpretations, you have never tried to send out a HTML newsletter that looks the same in any mail client and/or web-based client like GMail or RoundCube.

You'd better keep it structurally simple, use (nested) tables instead of HTML5 and the least amount of CSS you can get away with. That does keep the layout of your generated HTML message more or less the same between different mail clients.

Yes, I'm fully aware on how the above sounds. Took me hours to design and generate HTML mail messages correctly (using Windows batch script, so you could say I learned this the hard way). Mail is received correctly in the Thunderbird mail client and GMail/RoundCube clients, around 99% of the content shows up correctly in Outlook 2010, Outlook 2013 shows about 95% of the content correctly. Never tried it with newer versions of Outlook.

Thanks for your comments and time.  Found a way around my problem.  Break <br> ... Break ... Break! Problem resolved!



[0] Message Index

Go to full version