I can view this email signature correctly in VS Code and my browser, but all the other applications I've tried so far are unable to display it correctly

Simply put, I am facing an issue with my email signature. I use eM Client, while my client uses Outlook and I've also checked it in iCloud webmail. Surprisingly, none of these platforms display my email signature correctly, but VS Code and all my browsers do without any problem. I designed the signature using auto-layout in Figma and then exported the code to create the signature file. This is how the file looks (please bear in mind that I'm quite new to this, so the code might not be perfect):

<html>
  
  <head>
    
    <title>Compucable email-signature</title>
    <style>  
@import url("https://fonts.googleapis.com/css?family=Rubik:300,700,italic"); 
@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
...
    ...
  ...
</html>

I initially tried using SVG for the email signature, but later discovered that Outlook does not support it. Subsequently, I encoded the images as base64 data. Now, I am unsure about what steps to take next.

View broken signature here

I have read about using tables for creating email signatures. However, I am unclear about the process and whether I should start over from scratch. Can you embed images within tables?

Answer №1

Unfortunately, email design seems to be stuck in the past, reminiscent of 2004.

To ensure compatibility, it's best to utilize tabular layouts for emails. It may not sound glamorous, but it gets the job done! (No)

Unfortunately, no svg support. Any svg files will simply convert into small png images hosted on your server, with a link inserted in the email message.

It's crucial to inline all styles within the email content. One approach is to write code in scss, convert it to css, then use tools like gulp, to merge HTML and CSS for an inlined layout.

You can include some @media css rules alongside your email styles, although note that only certain email services will interpret them correctly. Aim to create visually appealing designs that adapt well to both mobile and desktop interfaces.

For further guidance on crafting beautiful emails, check out these helpful resources:

  • CSS properties you can utilize
  • Best Practices & Considerations for HTML Email Writing
  • Test your email display and delivery process
  • Prefer using 'em' units over 'px'

Consider leveraging gulp tools to streamline your email creation process:

package.json:

{
  ...
  "scripts": {
    "start": "gulp buildEmail"
  },
  "devDependencies": {
    "gulp": "^4.0.2",
    "gulp-email-builder": "^3.0.0"
  }
}

gulpfile.js:

const gulp = require('gulp');
const emailBuilder = require('gulp-email-builder');

gulp.task('buildEmail', function () {
  return gulp
    .src(['./src/emails/*.html'])
    .pipe(emailBuilder().build())
    .pipe(gulp.dest('./dist/emails/'));
});

That covers it - place your html emails in ./src/emails/, retrieve the transformed versions from ./dist/emails/

Answer №2

If you're designing an email template, consider using tables and don't forget you can insert images within the table.

.container {
  padding: 2rem 0rem;
}

h4 {
  margin: 2rem 0rem 1rem;
}

.table-image {
  td, th {
    vertical-align: middle;
  }
}
<link href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
  <div class="row">
    <div class="col-12">
        <table class="table table-image">
          <thead>
            <tr>
              <th scope="col">Day</th>
              <th scope="col">Image</th>
              <th scope="col">Article Name</th>
              <th scope="col">Author</th>
              <th scope="col">Words</th>
              <th scope="col">Shares</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <th scope="row">1</th>
              <td class="w-25">
                  <img src="https://s3.eu-central-1.amazonaws.com/bootstrapbaymisc/blog/24_days_bootstrap/sheep-3.jpg" class="img-fluid img-thumbnail" alt="Sheep">
              </td>
              <td>Bootstrap 4 CDN and Starter Template</td>
              <td>Cristina</td>
              <td>913</td>
              <td>2.846</td>
            </tr>
            <tr>
              <th scope="row">2</th>
              <td class="w-25">
                  <img src="https://s3.eu-central-1.amazonaws.com/bootstrapbaymisc/blog/24_days_bootstrap/sheep-5.jpg" class="img-fluid img-thumbnail" alt="Sheep">
              </td>
              <td>Bootstrap Grid 4 Tutorial and Examples</td>
              <td>Cristina</td>
              <td>1.434</td>
              <td>3.417</td>
            </tr>
          </tbody>
        </table>   
    </div>
  </div>
</div>

For more information on creating email templates with HTML and CSS, check out this blog post: https://www.geeksforgeeks.org/email-template-using-html-and-css/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automatically Dismissing a Bootstrap Alert After a Set Number of Seconds

Having some trouble closing a Bootstrap alert automatically on my new site built using the Bootstrap Framework. The issue arises when trying to close the alert after a certain amount of time. On the main page of the site, there is a modal login form. When ...

Manipulating div positions using JQuery and CSS

Whenever I hover over the #HoverMe div, a hidden #hidden div appears, and when I unhover it, the hidden div disappears again. The #hidden div contains a sub-div that functions like a dropdown list. The #hidden div is styled with position: absolute;. How ca ...

Trouble displaying portrait images in CSS slideshow

My portfolio includes an image slider called wow slider, which can be found at You can view my site with the image slider on this page: http://jackmurdock.site50.net/StudioWork.hmtl While most of the galleries display portrait and landscape images correc ...

What are alternative ways to add an HTML snippet to an existing file without relying on jQuery?

Is it possible to inject the entire content of an HTML file, including all tags, into a specific div using only JavaScript? Alternatively, would it be necessary to append each element individually and create a function for this purpose? ...

I've encountered an issue with adjusting certain property values for an SVG component within my React project

I'm experiencing an issue where the pointer property is working, but the fill property isn't having any effect. When I inspect the elements in the browser console, I can manually change the element.style to affect the styling of the SVG component ...

Tips on elevating a dragged div above all other elements when utilizing two scrollbars

Currently, I have two horizontal scrollers where I need to drag a div from the upper scroller to the lower scroller. While this functionality is working properly, there is an issue with the dragged div getting lost under the borders of the scroller during ...

Opting for HTML tags directly rather than using div.class

On my blogsite, I have implemented special tags that are designed to be user-friendly for my colleagues who may not be familiar with HTML. For instance: <question>...</question> and <answer>...</answer> These tags are then style ...

What steps should I take to make my Vue JS delete function operational?

As I work on developing my website, I've encountered some challenges. Being new to coding, I'm struggling with creating a functional delete user button. When I click delete, it redirects me to the delete URL but doesn't remove the entry from ...

designing a button layout with bootstrap framework

I am attempting to position a "Redigera" button after the "Avsluta" button <div class="row"> <div class="col-md-4"> </div> <div class="col-md-4"></div> <div class="col-md-4"> <button class=" ...

After utilizing the function, the forward and back arrows are no longer visible

After setting up my slideshow, I encountered an issue where clicking the next or previous buttons caused them to shrink down and turn into small grey boxes. Has anyone experienced this before? This relates to PHP/HTML if ($_SERVER['REQUEST_METHOD&ap ...

Assistance required in publishing a website

Just finished coding my first website in HTML using Notepad. Now I'm wondering how to go about publishing it. Does DREAMWEAVER play a role in this process? Do I need it to upload the code to web hosting services or can I do it directly? And if so, how ...

fullpage.js: the content exceeds the height limit

I am currently working on customizing the jquery script fullpage.js for a website built on the French CMS "SPIP" (). This script is used to create a one-page website with both horizontal and vertical navigation. However, I have encountered an issue with ...

Prevent unnecessary requests for asset images in Angular 5

Within my Angular application (running version 5.1.0, built with angular-cli and webpack), I have a country selector component that allows users to choose a country from a drop-down menu or by typing the name in an autocomplete field. Each matching result ...

Leveraging $last in Angular for obtaining the final visible element with ng-show

My ng-repeat container div contains multiple images, each with a corresponding div next to it. Using $last, I can make sure only the div of the final image is visible after all images. However, I also have a filter button on the page that hides certain im ...

Troubleshooting a navigation issue in Angular involving the mat-sidenav element of material UI while transitioning between components

I would greatly appreciate your assistance in resolving the issue I am facing. I have been trying to navigate from one view to another, but when I use an <a> tag nested within a <mat-sidenav>, I encounter the following error: "Uncaught (in prom ...

How can I create a rectangular border around text using the HTML5 canvas?

How can I dynamically draw fitted rectangles around text labels (person's full name) without fixed sizes, taking into account that the labels vary in lengths? Below is the code used to draw the text labels: var ctx = document.getElementById('ma ...

`How to perfectly place multiple text blocks and images using CSS`

Check out this screenshot to see the issue I'm facing: Here is the HTML code: <div class="parent_process"> <div class="first_process"><img src="images/exprimer-besoin-telephonie.png"/><span style="width:18%">You fi ...

Struggling with a dynamic HTML table using Mustache and Icanhazjs technologies

I am encountering an issue while attempting to construct a dynamic table using Icanhazjs (Mustache). The table data is consistently rendered outside the table tag, resulting in my data not being displayed within the table itself. To observe the output, pl ...

Angular problem arises when attempting to map an array and selectively push objects into another array based on a specific condition

Setting up a cashier screen and needing an addToCart function seems pretty simple, right? However, I am encountering a strange logical error. When I click on an item to add it to the cart, my function checks if the item already exists in the array. If it d ...

Tips for incorporating a PDF file into a website when the Adobe Reader add-on is disabled in Internet Explorer

I attempted to insert a PDF into my website using the <embed> tag. Unfortunately, it doesn't seem to be functioning properly in Internet Explorer when the Adobe Reader add-on is disabled. Is there a solution that will allow it to work even if th ...