Right border (pipe) for email menu - email

On our email there is a menu and we would like a border (pipe) between each of the items. I have tried putting in border-right: 1px solid #ffffff in a couple of different places with no luck. How and or where does the border code go?
this is what the code looks like:
<div block="editable" name="Navigation Link 2" description="Style With - color:#FFFFFF; text-decoration:none;" id="navlink2" key="navlink2" display="link">Help</div>
</td>
<td align="center" valign="top" style="display: inline-block; padding: 5px 10px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #FFFFFF; border-right:#FFF>

Your HTML doesn't seem complete, you are missing an end quote on your style attribute, and you should really be doing style within a CSS file.
Other than that, your HTML is using border-right:#FFF - you should be using something like border-right: solid #FFF;
Note the style part (solid), you can also use dashed, double, etc... but the default is none so you'll have to specify something.
Border Style reference
Fiddle Demo
If you are still having an issue, it's probably something wrong with your dom structure and you should post a more complete picture.

smerny is right about your code being messy. If you want html to render even remotely right via email you need to make sure that your html is clean. Validators (http://validator.w3.org/) can help with this. There are lots of pit falls to consider when writing html for an email, more than I can get into here, but to address your specific problem one of these methods should work:
Method 1:
<table>
<tbody>
<tr>
<td style="border-right: solid"> Help </td>
<td style="border-right: solid"> Lorem </td>
<td style="border-right: solid"> Ipsum </td>
</tr>
</tbody>
</table>
Method 2:
<style>
td {
border-right: solid;
}
</style>
<table>
<tbody>
<tr>
<td> Help </td>
<td> Lorem </td>
<td> Ipsum </td>
</tr>
</tbody>
</table>
Fiddle

Related

Coloring table rows in Azure Wiki

How can I create colored rows in table in Azure Devops Wiki? I want to create something like below
.table-striped th {
height: 45px;
background-color: #bfff00 !important;
color: #191919;
}
.table-striped tr:nth-child(even) td {
background-color: #4287f5;
}
<div>
<table class="table-striped">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
</table>
</div>
The main way of creating tables in Azure Wiki is Markdown table, and from what I found is that Markdown does not support color. Maybe there is any trick?
From Azure Wiki Syntax Help I found out that HTML tags and YAML tables are also supported, but everything that I was able to achieve is coloring via span tag inside markdown:
<span style="background-color: red">57065</span>|<span style="background-color: red">4560</span>|<span style="background-color: red">I AM TABLE ROW</span>
and that looks ugly.
Is there a way to achieve full-fledged coloring?
Try with inline styling. Here I made an example:
<table style="border:ridge 4px red">
<tr style="background-color:blue;color:white;" id="ROW1">
<td style="border:ridge 4px red" >Cell 1.1</td>
<td style="border:ridge 4px red">Cell 1.2</td>
<td style="border:ridge 4px red">Cell 1.3</td>
</tr>
<tr style="background-color:yellow;color:green;" id="ROW2">
<td style="border:ridge 4px red">Cell 2.1</td>
<td style="border:ridge 4px red">Cell 2.2</td>
<td style="border:ridge 4px red">Cell 2.3</td>
</tr>
</table>
It looks like that in Azure DevOps Wiki:
I hope it will help you, but.. I strongly encourage to keep markdown simple. Please take a look at this stack discussion: Color in Markdown

Custom Email Template in Campaign Monitor for Outlook

How can I solve the Outlook problem in my custom html template. What I currently have:
<table cellpadding="0" cellspacing="0" width="700" align="center">
<tr>
<td style="width:100%;display:block;" align="left">
<!--[if mso]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://" style="height:40px;v-text-anchor:middle;width:170px;" strokecolor="#ce162e" fillcolor="#ffffff">
<w:anchorlock/>
<center>
<singleline label='Button Title'>Read More</singleline>
</center>
</v:rect>
<![endif]-->
<a href="https://" style="border:2px solid red;text-decoration:none;">
<singleline label="Button Title">Read More</singleline>
</a></td>
</tr>
</table>
If an outlook mail client opens the mail, I can see the CTA, but if I edit the CTA text in the editor in Campaign Monitor, the changes only apply to non-Outlook mail clients. Is there a way to solve that problem?
Many thanks in advance.
Bests,
Yanick
Since you are using custom email template, you can replace your VML button with the one below. This button will work the same across all email clients. It will eliminate the issue you are facing in campaign monitor as well.
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 0px; text-align: center;" valign="top" bgcolor="#3498db" align="center"> Call to action </td>
</tr>
</table>

Email template table showing spacing in mobile devices

I have created a custom email template and the content is below :
...
<table id="Table_01" width="70%" border="0" cellpadding="0" cellspacing="0" style=" backgroud:red;border-collapse: collapse;border-spacing: 0;">
<tr>
<td valign="top">
<img style="display:block; border: 0px;width:100%;" src="images/01.png" alt="">
</td>
</tr>
<tr>
<td valign="top">
<table id="Table_02" width="100%" border="0" cellpadding="0" cellspacing="0" style=" border-collapse: collapse;border-spacing: 0;">
<tr>
<td>
<img style="display:block; border: 0px;width:100%;" src="images/02_01.png" alt="">
</td>
<td >
<img style="display:block; border: 0px;width:100%;" src="images/02_03.png" alt="">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<img style="display:block; border: 0px;width:100%;" src="images/03.png" alt="">
</td>
</tr>
</table>
...
Above code created a table with three tr and it is showing properly in desktop but in mobile devices showing some spacing.
As above image table showing red line spacing in mobile devices.
How to remove these spacing?
**It helps to include a few CSS resets in the <head> of the email.**Here are a few that I use the focus on resetting spacing and borders of <table>s and <td>s:
<head>
<style>
/* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
table {
border-spacing: 0 !important;
border-collapse: collapse !important;
table-layout: fixed !important;
margin: 0 auto !important;
}
table table table {
table-layout: auto;
}
/* What it does: Stops Outlook from adding extra spacing to tables. */
table,
td {
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
</style>
</head>
Here is the full CSS reset I use for emails.

<hr> tag not working in email template for outlook 2013

I have developed an email template. Everything is working fine in my email template except the hr tag in Outlook 2013.
I have attached images
Result which i am getting:
Result which i want:
Please help me with suitable codes.
The <hr> is inconsistently supported in email clients. It's easier to do a horizontal rule in email by using a <table> tag, something like this:
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="background:black; height:1px;>
<tr>
<td style="font-size:0; line-height:0;">
</td>
</tr>
</table>
It might seem like a lot of code for simple <hr>, but you'll get the best email client coverage by using <table>s.
In my case, the layout showed strange horizontal lines on Outlook 2010-2019.
To avoid that, this code works for me:
<!--[if mso]>
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr width="100%">
<td width="100%" style="width: 100%; border-top: 1px solid #ffffff; padding-bottom: 1px;">
</td>
</tr>
</table>
<![endif]-->
<!--[if !mso]><!-->
<hr align="left" style="border: 0px; border-top: 1px solid #ffffff; color: #ffffff; background: #ffffff; margin: 0px;"/>
<!--<![endif]-->
An alternative to using <hr> in email clients is the following, which produces a similar effect, i.e., a thin horizontal line:
<div style="background: #d9d9d9; font-size: 1px; line-height: 1px;"> </div>
This has been verified to render properly in Outlook 2016, but should also work in 2013.

iText's XmlWorker does not recognize border-bottom on table cell

XmlWorker does not recognize border-bottom on table cell.
This is my code:
<table>
<tbody>
<tr>
<th style="width: 20%; height: 40px; vertical-align: top; border-bottom: 1px solid gray">Your name</th>
<td style="width: 80%; border-bottom: 1px solid gray"></td>
</tr>
<tr>
<th style="height: 40px; vertical-align: top; border-bottom: 1px solid gray">Your lastname</th>
<td style="border-bottom: 1px solid gray"></td>
</tr>
</tbody>
</table>
I'm testing using this official tool:
http://demo.itextsupport.com/xmlworker/
(Click "html" button, under "font size", and paste code)
I'm also testing using iTextSharp + MvcRazorToPdf (two C# libraries).
Question:
How can I get the border-bottom to work?
Edit:
Acording to this compatibility summary: http://demo.itextsupport.com/xmlworker/itextdoc/CSS-conformance-list.htm, the css property border-bottom should work fine with the html element td (cell)
XMLWorker does not support for shorthand CSS properties in case side specific border styles. The global property "border" should be supported. It looks like a typo in the conformance list.
Please use the property full names instead:
<td style="... border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: gray" ...>