Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More issues with IMG
Message
From
21/04/2012 13:54:35
 
 
To
21/04/2012 13:15:47
General information
Forum:
HTML5
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01542291
Message ID:
01542292
Views:
36
This page explains it all:

http://www.emailonacid.com/blog/details/C18/12_fixes_for_the_image_spacing_in_html_emails

However, I did not find a universal way to style this so to avoid changing the code.

Depending on where the image is, at the top, inside a TD, or else, none of the solution mentioned on that page will work.

The only way to have a universal way for the alignment method I have is to call a method in the code to generate the proper HTML. So, instead of just using a transparent Point.gif to align left and/or top, I need to include that inside a DIV such as the following:
<!DOCTYPE html>

<Head>
<Base HRef="http://www.levelextreme.com/"></Base>
<Style>BODY
{
   Padding-Top: 0px;
   Padding-Left: 0px;
   Padding-Right: 0px;
   Padding-Bottom: 0px;
   Margin-Left: 0px;
   Margin-Right: 0px;
   Margin-Top: 0px;
   Margin-Bottom: 0px;
}

</Style>
</Head>

<html> 
<body>
<DIV Style="Font-Size: 0px;"><IMG SRC=Images/Point.gif Width=1 Height=2></DIV>
<TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=1000 ALIGN=CENTER Style="Border: #444444 1px solid;">
<TR>
<TD Style="Border-Bottom: #444444 1px solid;"><DIV Style="Font-Size: 0px;"><IMG src="Images/Top.jpg" width=1000 height=80></DIV></TD>
</TR>
<TR VALIGN=TOP>
<TD BGCOLOR="#FFFFFF"><DIV Style="Font-Size: 0px;"><IMG SRC=Images/Point.gif Width=1 Height=2></DIV>Test
<BR>
<IMG SRC=Images/Account.png BORDER=0>a</TD>
</TR>
</TABLE>
</body> 
</html> 
Thus, this represents a lot of replace all with a function which will accept the two parameters, thus tnLeft and tnTop, which will then generate the proper DIV + IMG + /DIV sequence.

If you try this code, you will see that this encapsulation works wherever you have to use a Point.gif approach, such as I use, to align specific content on your page. So, basically, you will end up with the image as shown in the previous message for image 3.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform