• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Customizing href mailto link with fonts

    I have an href mailto link on my websit that looks like this:

     

    <script type="text/javascript">
    <!-- Begin
    user = "studio";
    domain = "andrewpooletodd.com";
    document.write(' <a href=\"mailto:' + user + '@' + domain + '\">' +
    user + '@' + domain + '</a>');
    // End -->
    </script>
    <noscript>put image of email address here</noscript>

     

     

    How can I change this to a different font?

    1 REPLY 1
    Advocate V Advocate V
    Advocate V

    You'll probably have the best luck with CSS.

    If you want to style only this link and no others, add an id to the script:

    <script type="text/javascript">
    <!-- Begin
    user = "studio";
    domain = "andrewpooletodd.com";
    document.write(' <a href=\"mailto:' + user + '@' + domain + '\" id=\"mailto\">' +
    user + '@' + domain + '</a>');
    // End -->
    </script>
    <noscript>put image of email address here</noscript>

     This will allow you to target the link.  Somewhere in the head section, add the CSS in a style block:

     

    <style>
    #mailto {
      font-family: Verdana, Arial, sans-serif;
      font-weight: bold;
      font-size: 120%;
      color: red;
    }
    </style>

    You haven't really specified how you want the font changed so I put in some examples to get you started.

    HTH

     

    Keep on Coding!
    Mark Cicchetti - There are 10 kinds of people... those who understand binary and those who don't.