Chris Hardcastle
Chris Hardcastle

Reputation: 131

Gmail signature - text-decoration:none

I realise this has been asked many times before so apologies if I'm repeating myself but having followed many other tips on this I'm getting some weird behaviours in Gmail.

If I open the below code in a browser, copy it and then paste it into a Gmail sig (via Settings) the text respects the text-decoration attribute (I'm using the span and !important as advised by other posts).

I can now create/send emails and the styling is respected.

But if I quit Gmail and then log-in again, the text-decoration:none styling is suddenly ignored. The only way to 'repair' is to copy/paste the sig back in again (via Settings).

I'm wondering if something has changed in Gmail as I've been using this sig for a good year or so and it's only recently that I've noticed this behaviour.

Anybody else experienced this (or can see anything wrong with my code)?

<body>
  <table width="98%" border="0" cellspacing="0" cellpadding="0" style="font-family:'Lucida Grande','Lucida Sans','Lucida Sans 
        Unicode';font-size:12px;margin:0px">
    <tr>
      <td>
        <a href="http://maps.google.com?q=Mainframe North" target="_blank" style="text-decoration:none !important;color:rgb(180,180,180);">
          <span style="text-decoration:none !important;color:rgb(180,180,180);">
            82 Silk Street<br>Manchester M4 6BJ
        </span>
        </a>
      </td>
    </tr>
  </table>
</body>

Updated code as per comments below:

<table width="98%" border="0" cellspacing="0" cellpadding="0" style="font-family:'Arial';font-size:12px;margin:0px;color:#B4B4B4">
  <tr>
    <td>
    <a href="http://maps.google.com?q=Mainframe North" target="_blank" style="text-decoration:none">
        <span style="text-decoration:none;color:#B4B4B4">
        82 Silk Street<br>Manchester M4 6BJ
        </span>
    </a>
    </td>
  </tr>
</table>

Upvotes: 8

Views: 7718

Answers (3)

Tommy Cunningham
Tommy Cunningham

Reputation: 120

Use text-decoration: unset;

This issue still exists in Gmail and since most browsers are now Chromium-based, using "another browser" generally presents the exact same issue.

Adding text-decoration: none; via Inspect Element and making a minor change to enable "Save Changes" still works.

Alternatively, use text-decoration: unset; instead and paste the signature into Gmail. Gmail doesn't remove text-decoration: unset; and the signature loads without links underlined.

Upvotes: 9

Tim Owens
Tim Owens

Reputation: 159

The issue is a bug with Google's fork of Webkit Layout Engine, Blink. When just viewing the Gmail Settings page in Chrome, the "text-decoration:none" style tag is completely removed from your signature permanently.

I found a hack to fix this issue though:

  1. Either paste your HTML signature into Gmail Settings using any other browser,
  2. or do the following:

    • Right-click the underscored element in your signature and inspect
    • In the inspection window, add the "text-decoration:none" back into your style attribute
    • Introduce a text change in the signature like a space so that the "Save Changes" button activates.
    • Save your changes.

Voila, no more underscores ever (or at least until you change your signature once again).

Upvotes: 15

Chris Hardcastle
Chris Hardcastle

Reputation: 131

It seems adding and saving my signature in Gmail via Safari (rather than Chrome) fixed my issue.

Upvotes: 5

Related Questions