Avoid using rowspan for email comms - html

I've always used rowspan for web site development but now designing and developing email comms rowspan, it appears constantly breaks. In multiple clients it displays with a 10/20px gap. How can I avoid using row span even if I need to have two images side by side in an email (such as a header)?
<html>
<head>
<title>StPatricksDAy-PostCard</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (StPatricksDAy-PostCard.psd) -->
<table id="Table_01" width="657" height="684" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="6">
<img src="images/StPatricksDAy-PostCard_01.gif" width="19" height="643" alt=""></td>
<td colspan="3">
<img src="images/StPatricksDAy-PostCard_02.gif" width="636" height="14" alt=""></td>
<td rowspan="6">
<img src="images/StPatricksDAy-PostCard_03.gif" width="2" height="643" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/StPatricksDAy-PostCard_04.gif" width="636" height="96" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/StPatricksDAy-PostCard_05.gif" width="636" height="9" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/StPatricksDAy-PostCard_06.jpg" width="257" height="523" alt=""></td>
<td>
<img src="images/StPatricksDAy-PostCard_07.gif" width="368" height="449" alt=""></td>
<td rowspan="3">
<img src="images/StPatricksDAy-PostCard_08.gif" width="11" height="524" alt=""></td>
</tr>
<tr>
<td>
<img src="images/StPatricksDAy-PostCard_09.gif" width="368" height="74" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/StPatricksDAy-PostCard_10.gif" width="625" height="1" alt=""></td>
</tr>
<tr>
<td colspan="5">
<img src="images/StPatricksDAy-PostCard_11.gif" width="657" height="28" alt=""></td>
</tr>
<tr>
<td colspan="5">
<img src="images/StPatricksDAy-PostCard_12.gif" width="657"
height="13" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>

Related

Issues With Outlook Adding Padding To Email Signature Images

I'm trying to create an email signature and it looks fine in my web browser.
(https://i.postimg.cc/Pq2v5msd/Email-Right.png)
However, when I add it to Outlook, it creates weird padding around my image cells.
(https://i.postimg.cc/d0qTF5fW/Email-Wrong.png)
I'm not sure what step I'm missing in my code. Can I get some help please?
<html>
<head>
<title>Test Email</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Test Email.psd) -->
<table id="Table_01" width="510" height="170" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="7">
<a href=https://www.website.com><img src="https://i.postimg.cc/HnQHs6wP/Email-Test-01.jpg" width="159" height="170" alt=""></td>
<td colspan="2" rowspan="2">
<img src="https://i.postimg.cc/BZDJgnrc/Email-Test-02.jpg" width="313" height="79" alt=""></td>
<td>
<a href=https://www.linkedin.com><img src="https://i.postimg.cc/9FYV6NFD/Email-Test-03.jpg" width="38" height="43" alt=""></td>
<td height="43" nowrap></td>
</tr>
<tr>
<td rowspan="2">
<a href=https://www.facebook.com><img src="https://i.postimg.cc/VL8mHc1y/Email-Test-04.jpg" width="38" height="43" alt=""></td>
<td height="36" nowrap></td>
</tr>
<tr>
<td rowspan="2">
<a href="tel:7777777777"><img src="https://i.postimg.cc/rwycMCKQ/Email-Test-05.jpg" width="110" height="29" alt=""></td>
<td rowspan="2">
<a href="mailto:email#email.com"><img src="https://i.postimg.cc/RZPmF6t9/Email-Test-06.jpg" width="203" height="29" alt=""></td>
<td height="7" nowrap></td>
</tr>
<tr>
<td rowspan="2">
<a href=https://www.youtube.com><img src="https://i.postimg.cc/QMH3W8g7/Email-Test-07.jpg" width="38" height="42" alt=""></td>
<td height="22" nowrap></td>
</tr>
<tr>
<td colspan="2" rowspan="2">
<a href=https://goo.gl/maps><img src="https://i.postimg.cc/Pq9kWgKR/Email-Test-08.jpg" width="313" height="39" alt=""></td>
<td height="20" nowrap></td>
</tr>
<tr>
<td rowspan="2">
<a href=https://www.website.com><img src="https://i.postimg.cc/B6FfMmVQ/Email-Test-09.jpg" width="38" height="42" alt=""></td>
<td height="19" nowrap></td>
</tr>
<tr>
<td colspan="2">
<img src="https://i.postimg.cc/D0KkD19Q/Email-Test-10.jpg" width="313" height="23" alt=""></td>
<td height="23" nowrap></td>
</tr>
</table>
<!-- End Save for Web Slices -->
<div style="background-color:#FFFFFF">
<style>
hr {
height: 1px;
background-color: #9d9d9d;
border: none;
}
div {
padding-top: 5px;
padding-right: 8px;
padding-bottom: 1px;
padding-left: 8px;
}
</style>
<body>
<hr>
<span style="font-size:9pt; font-family: 'Cambria','times new roman','garamond',serif; color:#223488;">This email may contain confidential and/or proprietary information. If you are not the intended addressee or have received this email in error, please inform the sender immediately and destroy this email. Unauthorized copying and/or forwarding of this email is strictly prohibited.
</p>
</div>
</body>
</html>

Responsive web page - splash page

I know this is a basic question but I'm having difficultly making my site responsive.
It is a basic page that I've done in Photoshop. I've tried a lot of things to make it responsive with no luck.
Here is my HTML code:
<html>
<head>
<title>newbeebosite</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (newbeebosite.psd) -->
<table id="Table_01" width="1601" height="1401" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7">
<img src="images/Home_01.jpg" width="1600" height="21" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="21" alt=""></td>
</tr>
<tr>
<td colspan="5" rowspan="2">
<img src="images/Home_02.jpg" width="1216" height="46" alt=""></td>
<td>
<img src="images/Home_03.jpg" width="192" height="45" alt=""></td>
<td>
<img src="images/Home_04.jpg" width="192" height="45" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="45" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="2">
<img src="images/Home_05.jpg" width="384" height="88" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td>
<img src="images/Home_06.jpg" width="78" height="87" alt=""></td>
<td>
<img src="images/Home_07.jpg" width="251" height="87" alt=""></td>
<td colspan="3">
<img src="images/Home_08.jpg" width="887" height="87" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="87" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/Home_09.jpg" width="971" height="160" alt=""></td>
<td>
<img src="images/Home_10.jpg" width="1" height="160" alt=""></td>
<td colspan="2">
<img src="images/Home_11.jpg" width="436" height="160" alt=""></td>
<td>
<img src="images/Home_12.jpg" width="192" height="160" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="160" alt=""></td>
</tr>
<tr>
<td colspan="7">
<img src="images/Home_13.jpg" width="1600" height="1086" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1086" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="78" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="251" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="642" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="244" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="192" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="192" height="1" alt=""></td>
<td></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
As a starter I would add:
<meta name="viewport" content="width=device-width, initial-scale=1">
in the head of your html document.
Explanation
This tells the browsers CSS engine "use the screen width of the device (measured in "device independent pixels") as the basis for your HTML element" - and therefore all "fluidly styled" descendant (child) elements will be affected because their height and width properties are based on their parent elements size.
width=device-width is what instructs the page to match the screen's width in device independent pixels. (as opposed to say width=1024 which would explicitly set the width of the page.)
Now when the browser width changes your CSS rules will be hooked into those changes.
I believe initial-scale=1 establishs a 1:1 relationship between CSS pixels and device independent pixels (If that doesnt make sense dont worry - but I would include it).
Then you need to make the table responsive by removing the fixed width definitions and replacing with width definition that change as the parent containers change size.
There is a good explanation of this here - https://developers.google.com/speed/docs/insights/ConfigureViewport
e.g. like this:
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (newbeebosite.psd) -->
<table id="Table_01" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7">
<img src="http://lorempixel.com/400/200/" width="80%" height="21" alt=""></td>
<td>
<img src="http://lorempixel.com/400/200/" width="80%" height="21" alt=""></td>
</tr>
<tr>
<td colspan="5" rowspan="2">
<img src="http://lorempixel.com/400/200/" width="80%" height="46" alt=""></td>
<td>
<img src="http://lorempixel.com/400/200/" width="80%" height="45" alt=""></td>
<td>
<img src="http://lorempixel.com/400/200/" width="80%" height="45" alt=""></td>
<td>
<img src="http://lorempixel.com/400/200/" width="80%" height="45" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
Here is a working demo - http://jsbin.com/dilejobofu/1/edit?html,output

arabic data is not displaying in ie8

I am facing a problem with Arabic data. It is not displaying properly in IE whereas it is displaying properly in Chrome.
I am using two files 'frameset.html'& 'legend.html' . 'legend.html' has Arabic content.Earlier I used div's in place of frames in 'frameset.html' and the Arabic data was working fine but after I changed, it is having problem.
Frameset.html:
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="js/jquery.js"></script>
<script>
$(document).ready(function(){
$("#topArb").load("Top_arb.jsp");
$("#actionBar").load("ActionBar.jsp");
$("#viewInbox").load("ViewInbox.jsp");
$("#legend").load("Legend.html");
$("#nav").load("Nav.jsp");
});
</script>
</head>
<body>
<div id="main-container">
<div id="topArb">
</div>
<div id="left-container">
<div id="actionBar">
</div>
<div id="viewInbox">
</div>
<div id="legend">
</div>
</div>
<div id="right-container">
<div id="nav">
</div>
</div>
</body>
</HTML>
legend.html:-
<HTML >
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY topmargin=0>
<table align="center" style="" width="100%" height="20">
<tr>
<td>
<table>
<tr>
<td><IMG SRC="imgs/newH.gif" WIDTH="16" HEIGHT="16"
BORDER="0" ALT=""></td>
<td class="SET">وثيقة عاجلة</td>
</tr>
<tr>
<td><IMG SRC="imgs/new.gif" WIDTH="16" HEIGHT="16" BORDER="0"
ALT=""></td>
<td class="SET">وثيقة عادية</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td><IMG SRC="imgs/BnewH.gif" WIDTH="16" HEIGHT="16"
BORDER="0" ALT=""></td>
<td class="SET">وثيقة مؤرشفة عاجلة</td>
</tr>
<tr>
<td><IMG SRC="imgs/Bnew.gif" WIDTH="16" HEIGHT="16"
BORDER="0" ALT=""></td>
<td class="SET">وثيقة مؤرشفة عادية</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td><IMG SRC="imgs/CloseDoc.gif" WIDTH="18" HEIGHT="18"
BORDER="0" ALT=""></td>
<td class="SET">غير مقروء</td>
</tr>
<tr>
<td><IMG SRC="imgs/OpenDoc.gif" WIDTH="18" HEIGHT="18"
BORDER="0" ALT=""></td>
<td class="SET">مقروء</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td><IMG SRC="imgs/L.gif" WIDTH="18" HEIGHT="18" BORDER="0"
ALT=""></td>
<td class="SET">رد</td>
</tr>
<tr>
<td><IMG SRC="imgs/ic_waitingreply.gif" WIDTH="18"
HEIGHT="18" BORDER="0" ALT=""></td>
<td class="SET">نسخة من الوثيقة</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td><IMG SRC='images/ic_suspend.gif' WIDTH="18" HEIGHT="18"
BORDER="0" ALT=""></td>
<td class="SET">الأعمال المؤجلة</td>
</tr>
<tr>
<td><IMG SRC='imgs/ic_close.gif' WIDTH="18" HEIGHT="18"
BORDER="0" ALT=""></td>
<td class="SET">الأعمال المغلقة</td>
</tr>
</table>
</td>
<td><IMG SRC="imgs/Drafts.gif" WIDTH="18" HEIGHT="18" BORDER="0"
ALT=""></td>
<td class="SET">مسودة</td>
</tr>
</table>
</BODY>
Here my legend.html(marked) is displayed in junk data instead of arabic data
If the document gets corrupted only when loaded via AJAX, try ajaxSetup():
$.ajaxSetup({
"beforeSend": function (xhr) {
xhr.overrideMimeType("text/html; charset=UTF-8");
}
});
$("#legend").load("Legend.html");
My problem is solved just by changing the file from legend.html to legend.jsp

How to remove spacing between spliced images

Hey I made an image in Photoshop for an email newsletter. I sliced the image and added links to the images I want clicked, but when I send it in an email there are spaces between the images. How can I remove the spaces? Here is the coding.
<html>
<head>
<title>email_template_1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (email_template_1.psd) -->
<table id="Table_01" width="650" height="801" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="8">
<img src="images/ttcc_01.jpg" width="650" height="65" alt=""></td>
</tr>
<tr>
<td colspan="3" rowspan="2">
<img src="images/ttcc_02.jpg" width="507" height="33" alt=""></td>
<td rowspan="2">
<valign=top align=left width=33><img src="images/ttcc_03.jpg" width="33" height="33" border="0" alt="Blog"></td>
<td rowspan="2">
<img src="images/ttcc_04.jpg" width="10" height="33" border="0" alt="space"></td>
<td>
<valign=top align=left width=33><img src="images/ttcc_05.jpg" width="33" height="32" border="0" alt="Facebook"></td>
<td colspan="2" rowspan="2">
<img src="images/ttcc_06.jpg" width="67" height="33" alt=""></td>
</tr>
<tr>
<td>
<img src="images/ttcc_07.jpg" width="33" height="1" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/ttcc_08.jpg" width="650" height="25" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/ttcc_09.jpg" width="650" height="162" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/ttcc_10.jpg" width="650" height="347" alt=""></td>
</tr>
<tr>
<td colspan="2">
<img src="images/ttcc_11.jpg" width="504" height="1" alt=""></td>
<td colspan="6">
<img src="images/ttcc_12.jpg" width="146" height="1" alt=""></td>
</tr>
<tr>
<td>
<img src="images/ttcc_13.jpg" width="324" height="72" alt=""></td>
<td colspan="6"><valign=top align=left width=280><img src="images/ttcc_14.jpg" algin="left" width="280" height="72" border="0" alt="Click Here for more Information!"></td>
<td>
<img src="images/ttcc_15.jpg" align="left" width="46" height="72" border="0" alt=""></td>
</tr>
<tr>
<td colspan="8">
<img src="images/ttcc_16.jpg" width="650" height="95" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="324" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="180" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="3" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="33" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="10" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="33" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="21" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="46" height="1" alt=""></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
and the site
file:///Users/Dad/Dropbox/Apps/site44/ttc.site44.com/ttcc.html
Since your Photoshop is creating tables, and poor ones at that, you have a different issue. I would recommend that you apply the following style to your table:
#Table_01 {
border-collapse: collapse:
}
That should fix the problem.
But if you weren't using tables, you could still have the same issue. This is because the spaces between the images are whitespace. They occur because your server doesn't optimize the HTML output. The reason this is a problem is because images and spaces can both be interpreted as having the CSS property display: inline. (I know some browsers don't do that to images, but when they do, this kind of thing happens.)
The solution I've used is to strip out all whitespace from between tags when it matters. Here's a sample function for doing that.
function stripSpaceBetweenTags(container) {
var rex = />\s+</gm;
var htmlString = $(container).html();
htmlString = htmlString.replace(rex,"><");
$(container).html(htmlString)
}
The container argument is a string that can be used as a valid jQuery selector. What happens is that it strips all cases of whitespace (spaces, tabs, linefeeds, etc.) between tags if there is only whitespace between those tags. This is important: if you have other characters, you don't want them stripped out.
Think of it as an ad hoc optimizer. You don't have to do this to the whole page, and it's probably better if you don't. But if you have a container that holds images which have to be tight, tight, tight, this is a good workaround.

Saved for web in Photoshop sliced page looks bad in IE

I made web page via Photoshop, sliced it and saved for web and uploaded the html file. It looks just fine in Firefox and Chrome, but IE it is whole different story. Any one know how to fix it and why I`m getting this black padding?
IE:
Firefox, Chrome & Safari:
Code:
<html>
<head>
<title>Shamir Applications</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Webpage08.psd) -->
<table id="Table_01" width="960" height="720" border="0" cellpadding="0" cellspacing="0" style="margin-right: auto; margin-left: auto;">
<tr>
<td colspan="11">
<img src="images/Webpage08_01.png" width="960" height="237" alt=""></td>
</tr>
<tr>
<td rowspan="6">
<img src="images/Webpage08_02.png" width="130" height="483" alt=""></td>
<td>
<img src="images/Webpage08_03.png" width="138" height="36" alt=""></td>
<td rowspan="6">
<img src="images/Webpage08_04.png" width="142" height="483" alt=""></td>
<td colspan="3">
<img src="images/Webpage08_05.png" width="138" height="36" alt=""></td>
<td rowspan="6">
<img src="images/Webpage08_06.png" width="140" height="483" alt=""></td>
<td colspan="3">
<img src="images/Webpage08_07.png" width="138" height="36" alt=""></td>
<td rowspan="6">
<img src="images/Webpage08_08.png" width="134" height="483" alt=""></td>
</tr>
<tr>
<td rowspan="5">
<img src="images/Webpage08_09.png" width="138" height="447" alt=""></td>
<td colspan="3">
<img src="images/Webpage08_10.png" width="138" height="13" alt=""></td>
<td colspan="3">
<img src="images/Webpage08_11.png" width="138" height="13" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/Webpage08_12.png" width="14" height="146" alt=""></td>
<td>
<img src="images/Webpage08_13.png" width="110" height="110" alt=""></td>
<td rowspan="2">
<img src="images/Webpage08_14.png" width="14" height="146" alt=""></td>
<td rowspan="4">
<img src="images/Webpage08_15.png" width="16" height="434" alt=""></td>
<td>
<img src="images/Webpage08_16.png" width="110" height="110" alt=""></td>
<td rowspan="4">
<img src="images/Webpage08_17.png" width="12" height="434" alt=""></td>
</tr>
<tr>
<td>
<img src="images/Webpage08_18.png" width="110" height="36" alt=""></td>
<td rowspan="3">
<img src="images/Webpage08_19.png" width="110" height="324" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/Webpage08_20.png" width="138" height="17" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="images/Webpage08_21.png" width="138" height="271" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
Try to put this in your css file
img {
border:0;
padding:0;
margin:0;
}
or in the head tag write
<style type="text/css">
img {
border:0;
padding:0;
margin:0;
}
</style>
You could try switching from using the tables mode to using the css export instead?
With regard to Matei Mihai's answer you should probably add this as well:
img {
border:0;
padding:0;
margin:0;
display:block; /* This often removes extra spacing around images in IE */
}