Issue with font selection for emails on Outlook Windows not being properly implemented

After searching endlessly online, I have yet to find a solution for setting the font-family on all elements within the body of an email. While it works perfectly across various platforms like Outlook Mac, Gmail, and Yahoo using this CSS:

<style>
    body, table, td {font-family: Arial, Helvetica, sans-serif !important;}
</style>

Unfortunately, it does not work on Outlook Windows...

I attempted to set the font-family inline on every element in my email, as shown below, but it keeps reverting back to Times New Roman. Any advice or suggestions would be greatly appreciated.

<h2><span style="font-family: arial, helvetica, sans-serif;">EMAIL HEADING TEXT&nbsp;GOES HERE</span></h2>

Thank you.

Answer №1

Give this code a try to ensure your styles display correctly in MS Outlook. For more information, visit this link

<!--[if mso]>
<style type="text/css">
body, table, td {font-family: Arial, Helvetica, sans-serif !important;}
</style>
<![endif]-->

Answer №2

Make sure to enclose your style within the following format:

<!--[if !mso]>
<style type=”text/css”>
    body, table, td {font-family: Arial, Helvetica, sans-serif !important;}
</style>
<![endif]-->

It is important to note that Outlook may default to time new roman if you do not adhere to this structure when using style.

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

Why isn't the dropdown menu displaying beneath the background in bootstrap / HTML / CSS?

Having trouble creating a navbar with a dropdown menu on the right? I encountered an issue where the menu doesn't show up when clicked. However, after removing all CSS styles, the button starts working. .info { margin-top: 15%; display: table; ...

Ways to conceal components of an external widget on my site

I'm attempting to add a chat widget to my website and I'm looking to hide specific elements within the widget. The chat function is provided by Tidio, but I believe this applies to most widgets. My main goal is to conceal a button that minimize ...

Can someone assist me in properly spacing out my divs for three distinct media queries?

Here is the link to the CodePen containing the code: https://codepen.io/gregelious/pen/zYmLGex The CodePen features a restaurant menu with 3 categories (divs) displayed as separate boxes. (For detailed instructions, visit: https://github.com/jhu-ep-cours ...

What is the reason for needing to multiply all the numbers by ten in order to solve this floating point addition problem?

When dealing with floating point arithmetic in Javascript, it's common to see results like 0.2 + 0.1 = 0.30000000000000004, which can be confusing. However, a simple workaround is to multiply the numbers by 10, perform the operation, and then divide b ...

This JavaScript code is configured to only display content on half of the page

Has anyone experienced issues printing a full element (body) using the jquery plugin https://github.com/jasonday/printThis? I have only been able to print half of the element vertically. I also tried using raw javascript with window.print(); but encountere ...

Using Node.js and Express, the CSS does not load due to route parameters

I'm currently working on a basic website project using Node.js, Express, and the EJS template engine. I've run into an issue where my external CSS files are not loading properly on routes that contain route parameters. Here's a snippet of my ...

Tips for customizing the appearance of material-ui SelectField

Currently, I am utilizing material-ui alongside react with the version "material-ui": "^0.19.2". I am facing an issue while attempting to embed a SelectField inside a table. Although the functionality is working smoothly, there are two unexpected behaviors ...

Ways to utilize two distinct XPATH values for a single key

When dealing with Xpath for the same object in two different portals, the paths can be: //*[@id="abc"]/fieldset/div/div/div[1]/label //*[@id="xyz"]/fieldset/div[1]/fieldset/div/div/div[1]/label In order to use both values in the same key and have Seleni ...

Steps to avoid the letter "e" from being copied into the input field using Vue.js

<vs-input :value="contract.value" :class="isMobileOnly ? 'w-full' : 'w-1/2'" class="mx-auto" type="number" ...

The alignment of labels and text inputs using CSS flexbox is not correct

I am attempting to create a responsive layout for the labels and text inputs in my HTML code. I want them to align in a single row, with one label and one text input per row when the screen width is below a certain threshold. Once the screen width exceeds ...

Dynamic and static webpage

Is it possible to design a webpage using purely valid HTML and CSS that can dynamically adjust its size based on the browser window, while ensuring none of the content is lost or cut off? Please refer to the linked image for a visual representation of what ...

Having difficulty parsing HTML with JSoup

I am currently trying to fetch HTML data from a website in order to download a 480p video. However, I am facing issues with the process when using an Async Class. Below is my doInBackground Method: @Override protected Void doInBackground(Void... v ...

Is there a way to ensure that the table headers are printed on every page when using Google Chrome

When printing documents in Chrome browser, the table header (thead) does not appear on every page. I want to ensure that the table header is displayed on each printed page, just like it is done with IE and Firefox. However, Chrome does not support this fea ...

Unable to Toggle the 'Checked' Prop on Selection with React Bootstrap CheckBox

As a newcomer to React Bootstrap, I've been encountering an irritating problem with checkboxes in a form I'm developing. After updating the state, the checkboxes don't remain checked when selected. However, if I check them again, they stay ...

"Is there a method to make the height of one column in bootstrap equal to the combined heights of two columns

Looking to design a layout using bootstrap where I require one column to appear as two columns stacked vertically. To get a clearer idea, it would be beneficial if you could refer to the visual representation provided below. Additionally, I need it to be r ...

Unable to enclose a table within a div element for Chrome web browser

I attempted to keep a table within a div to ensure that the table's width does not go beyond the width of the containing DIV. This table consists of one row with two elements. The second element is fixed in length, while I want the first element to w ...

Reducing the Distance Between Columns in Bootstrap 4

I am currently working on embedding two websites onto my own website. The idea is to showcase these websites side by side within a custom-sized iframe that adjusts responsively based on the viewport size. To achieve this, I am utilizing Bootstrap 4's ...

Attempting to implement a Python-based Selenium test on a Bootstrap modal

Here is the HTML code snippet: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <div class="modal-content"> <div class="modal-header"> <h5 ...

Creating a sleek and functional mobile navigation bar with Bootstrap 4

Can anyone help me with creating a fullscreen menu (navbar) for mobile devices? I want the navbar to occupy the entire viewport when the hamburger menu is clicked. I managed to achieve this by simply adding: #navbarText{ height: 100vh; } However, the ...

Is there a way to create an internal link to another HTML templating engine page within Express.js?

I am currently facing an issue with two Pug files, index.pug and search.pug, stored in a /views folder. In my index.pug file, I have the following line of code: a(href="/search.pug") Search In my JavaScript file, I have specified the view engine as P ...