Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 986
Chris Hardcastle Avatar asked May 22 '17 12:05

Chris Hardcastle


1 Answers

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).

like image 183
Tim Owens Avatar answered Sep 18 '22 00:09

Tim Owens