Knowledge Base

How to remove spacing between email body and signature

Problem:

While composing a signature, you may encounter a problem where the spacing between the email body and the signature is too wide. This may be caused by incorrect signature design or unnecessary tags used in the HTML code of the signature.

Solution:

Here are the most common reasons for such behavior:

  1. There may be an empty paragraph tag (<p>) on top of your signature template. It does not add any content to the signature other than an empty space. An empty paragraph usually looks like this:
<p>&nbsp;</p>
  1. A top margin specified for an initial element of your signature (such as a paragraph or table cell) may be too large. To avoid this, place the cursor within this element and reduce the top margin value on the editor’s Formatting tab (Fig. 1.).

Warning

The recommended margin value is 0.1 pt or more. Do not set the margin value to 0. Otherwise, email apps may override it with their own default style settings, distorting the layout of your signature.

Adjusting the top margin on the Formatting tab.
Fig. 1. Adjusting the top margin on the Formatting tab.

Alternatively, you can reduce the value of the margin-top attribute in the HTML source code. For example, here’s how you can do it for an image: 

<img style="margin-top: 0.1pt" title="example" alt="[image]" src="https://imageserver.com/image.png">
  1. Similarly to the margin property, cell padding can also add extra space inside a table-based element of your signature. To fix this, it’s best to change padding to 0 in the Cell padding window accessible from the editor’s Table layout / Layout tab (the name varies in different CodeTwo programs), as shown in Fig. 2.

Adjusting cell padding on the Table layout tab.
Fig. 2. Adjusting cell padding on the Table layout tab.

Alternatively, you can set the padding-top attribute to 0 in the HTML source code. For example:

<table style="padding-top: 0; padding-right: 3pt; padding-left: 3pt">
  1. Another property that can add unwanted spacing on top of your signature is line spacing. To adjust it, enter an appropriate value in the Line spacing field on the editor’s Formatting tab (Fig. 3.).

Adjusting line spacing on the Formatting tab.
Fig. 3. Adjusting line spacing on the Formatting tab.

Alternatively, you can adjust the line height for each line of your signature by using the CSS property line-height in the HTML source code. For example:

<p style="line-height: 1.125">
  1. In CodeTwo Email Signatures On-prem and CodeTwo Exchange Rules (Pro) software (discontinued), pressing Enter starts a new paragraph. If you find the default paragraph spacing to be too large, create a line break instead. To do so, use the Shift+Enter shortcut.
  2. Note that paragraphs may be displayed differently across various email apps. To avoid this, use additional CSS properties for paragraph margins and padding in the HTML source code of your signature.
  3. If your signature is divided into two templates (e.g., when you use a separate template for a disclaimer), an unnecessary space may be added between them.

In CodeTwo email signature management software for on-premises Exchange, this can be resolved by adding the style margin: 0.1pt for any element after the <body> tag in the second template. It would look like this:

<body>
<p style="margin: 0.1pt">...</p>

In CodeTwo Email Signatures 365, the margin value is set to 0.1 pt by default. If you find the space to be too large, check if this default value hasn’t been changed in the second template. To do so, follow the guidelines from this section.

  1. If you create a signature template in a third-party tool, the tool may add some tags that are not supported by our software, or that are even not valid according to W3C standards. Importing the code created in such a tool into the template editor of any CodeTwo product may cause the template to be displayed incorrectly – for instance, additional spacing may be added. For that reason, we always recommend designing signatures directly in our built-in template editor.

Alternatively, you can use a template generated in our free email signature generator. Read this Knowledge Base article to learn how to import such a signature into your CodeTwo software.

  1. If you notice unnecessary spacing when sending emails from the Mail app on an iPhone or iPad, check if the app’s native signature does not have any spacing in it. To do so, access the device’s Settings and navigate to Apps (Fig. 4.).

Accessing app settings in iOS.
Fig. 4. Accessing app settings in iOS.

On the list of apps, tap Mail (Fig. 5.).

Accessing settings for the Mail app.
Fig. 5. Accessing settings for the Mail app.

Next, tap Signature (Fig. 6.).

Accessing signature settings.
Fig. 6. Accessing signature settings.

Finally, check the default signature for any unnecessary spacing (Fig. 7.).

Checking the iPhone signature for unnecessary spacing.
Fig. 7. Checking the iPhone signature for unnecessary spacing.

See also:

Was this information useful?
Our Customers: