In HTML emails, there are text underlines with breaks between every lowercase letter

There's this strange problem I'm encountering with the text-decoration: underline property where it seems to be skipping spaces between lowercase letters. I attempted using "text-decoration-skip-ink: none", but that didn't solve the issue, and honestly, I'm stumped as I've never come across this before. Unsure about how to go about troubleshooting this.

    <td>
<b><span style="text-decoration: underline 1px; font-size:15px;font-family:Arial,Helvetica Neue,Helvetica,sans-serif; color: #1C2A5B; text-decoration-skip-ink: none;">Estrogen-Alone Therapy</span></b></td>

https://i.sstatic.net/tvk2D.png

Answer №1

That's the way the highlighted feature is intended to function. I've tested it out (refer to the snippet below) and everything seems to be working fine. According to caniuse, it should work on all browsers except for IE (are you currently using Internet Explorer?)

.class-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  color: #1C2A5B;
  text-decoration-skip-ink: none;
}
<td>
  <b>
    <span class="class-name">Estrogen-Alone Therapy</span>
  </b>
</td>

To solve the issue, one suggestion would be to utilize a border-bottom, or even incorporate an ::after element to replace the underline.

Answer №2

Great suggestion! Unsure of the exact solution, but I do have a helpful workaround for you. Instead of using an underline with the span element, you can try the following:

Modify your code as shown below:

<tr>
    <td>
        <b><span style="text-decoration: underline 1px; font-size:15px;font-family:Arial,Helvetica Neue,Helvetica,sans-serif; color: #1C2A5B; text-decoration-skip-ink: none; display:inline-block">Estrogen-Alone Therapy</span></b>
    </td>
</tr>

Instead, try this approach:

<tr>
    <td>
        <b><span style="border-bottom: 1px solid orange; padding-bottom:10px; font-size:15px;font-family:Arial,Helvetica Neue,Helvetica,sans-serif; color: #1C2A5B; text-decoration-skip-ink: none; display:inline-block">Estrogen-Alone Therapy</span></b>
    </td>
</tr>

You also have the flexibility to adjust the spacing underneath the text. It's not necessarily a permanent fix, but it serves as a useful alternative. By replacing the underline with a border at the bottom and adding padding for spacing adjustment, you can achieve the desired look (before and after): https://i.sstatic.net/RR85q.png

Please take note: If this issue pertained to an "A" tag, you could simply add

"display:inline-block;"
to achieve the same effect. In this case, I refrained from adding it as the span is already inline.

Keep coding joyfully!

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

Header that stays fixed at the top within a collapsible accordion layout

I'm experimenting with creating an accordion-style layout that transitions to an accordion on smaller screens, as shown by resizing the snippet attached to this question. I'm using flex to establish a sticky header, which is currently only applie ...

Full options in Bootstrap Selectpicker are not being displayed

I am currently facing an issue with a searchable list containing nearly 2700 items in a bootstrap selectpicker. When I scroll down the options, only around 50 or 60 are displayed, leaving the rest empty. You can view this problem in detail by checking out ...

Creating a triangle shape in the upper right corner with text using CSS

Starting my journey in HTML and CSS. This link shows how I want to use the code: .container { width: 250px; height: 250px; position:relative; background-color:grey; } .corner { width: 0; height: 0; border-top: 150px solid # ...

A different approach to handling file uploads without using Ajax within a parent form

Currently, I am facing a challenge with an HTML form used to update personal details in my workplace's database system. The form includes a feature that allows users to upload a picture of the person they are editing. However, I am trying to enhance t ...

Uploading an image directly from the canvas

Can anyone assist me? I'm new to using canvas in HTML and I have a question - is there a method of uploading an image from canvas to the server using multipart file upload during form submission? ...

Issue observed in Angular Material: mat-input does not show background color when in focus mode

https://i.stack.imgur.com/eSODL.png Looking for a solution regarding the mat-input field <mat-form-field> <input class='formulaInput' matInput [(ngModel)]='mathFormulaInput'> </mat-form-field> The blue backg ...

Determining the maximum width with CSS by incorporating viewport width and the position on the

Is there a way to determine the max-width of an element in CSS based on the viewport width and the position of the element? I have a div that holds a table with variable column widths, so the size can change depending on the data. I want to set a maximum ...

What is causing my background image to move upward when I include this JavaScript code for FlashGallery?

There's an issue on my website where adding a flash gallery script is causing the background image to shift unexpectedly. You can view the affected page here: The culprit seems to be the "swfobject.js" script. I've identified this by toggling t ...

How to use Selenium WebDriver in Python to upload a file using a hidden input field

Html: <div id="js-cert-file" class="form-group"> <button id="js-ob-browse-n-upload" class="btn btn-ob browse-and-upload-onboarding-ssl-button" style=""> BROWSE & UPLOAD </button> <input id="js-cert-file" class="hidden btn btn-ob" ...

Adjusting the options in the subsequent dropdown menu based on the selection made in the initial dropdown menu

I am currently working on select boxes where values are dynamically added through an array. For example, if I have 4 values in the first select box, I only want to display 3 values in the second select box, excluding the value that has already been selecte ...

When the Ionic 5 iOS dark theme is activated, the header casts a subtle shadow when the menu bar is opened or

I have been attempting to determine why there is shadow styling in the header when the menubar is closed in Ionic iOS. After inspecting the elements, I am unable to pinpoint exactly where this style is being applied. It seems to be related to the .toolba ...

Grab every piece of JavaScript code and styling from the HTML document and transfer it into a textarea field

Below is my code that extracts the JavaScript like this: src="assets/js/jquery.min.js" src="assets/smooth-scroll/smooth-scroll.js" I want it to look like this: (I believe my regex is incorrect): <script src="assets/js/jquery.min.js"></script> ...

Setting session expiration for an HTML page in MVC with JavaScript - A step-by-step guide

I'm working on a HTML page within an MVC framework that includes a button click function. I'm trying to figure out how to redirect the user to the login page if the page remains idle for 30 minutes. I've attempted using the code snippet belo ...

Creating a FadeIn animation for a hidden div element by using the display:none property

Struggling to implement a fadeIn function for a div tag with a display:none property. How can I make the div tag visible and smoothly fade in while still keeping the display:none property? Attempted solution so far: <div class="graphs_line_based cle ...

using javascript to target a specific css selector attribute

I have a CSS file with the following code: .datagrid table tbody td { color: #00496B; border-left: 1px solid #E1EEF4; font-size: 16px ;font-weight: normal; } Is there a way to use JavaScript to dynamically change the font size? The code below worked ...

Using HTML classes to align text with colored letters in the center

I'm attempting to alter the colors of individual letters within a sentence using html and css. After conducting some research, I came across this method: Here is the html and css code snippet I used: .green { font-size: 20px; color: #0F3; te ...

unable to retrieve the data from the secondary dynamic cascading dropdown menu

Hopefully, my day's troubles will be resolved by now. I am facing an issue with two drop-down boxes. After submitting, only the value of the first dropdown box is available in the action page. The second dropdown box is dependent on the selection made ...

Is there a way to transform HTML special characters within files back to regular characters?

I received some source code files in an HTML output format which makes them difficult to use. For example, I have content like this: %include &quot;macros.mac&quot; It should actually look like this: %include "macros.mac" Is there a way (using ...

Create a modal using only HTML and CSS, no Javascript

Is it possible to create a modal using only HTML and CSS, without any JavaScript? I'm working on a project where I cannot use JavaScript but I still need a modal. <!DOCTYPE html> <html> <title>Minimal Modal Design</title> < ...

Using ASP.NET Server Controls to Toggle Textbox Visibility Based on Dropdown Selection

What is the optimal method for displaying or hiding a textbox or an entire div section based on a user's selection from a dropdown menu? I am uncertain if this can be achieved with server controls, so would it require using standard client-side HTML c ...