Simple CSS question about link formatting.

Discussion in 'Web Design and Development' started by definitive, Mar 14, 2011.

  1. definitive macrumors 68000

    definitive

    Joined:
    Aug 4, 2008
    #1
    I'm making a html based email template, and having trouble removing the text decoration from the link (or change its color). since the <style> stuff doesn't seem to work correctly, I'm doing everything in a <span> format like so:

    Code:
    <a href="http://www.website.com"><span style="color:#123123;font-family:sans-serif;text-align:center;font-weight:bold;font-size:12px;padding:0px;margin:0px;">www.website.com</span></a>
    When I tried to add

    Code:
    a:link{"color:#123123;text-decoration:none;"};
    after the margin:0px; along with a:hover and a:active, the link underline still remains the same default blue system color. Is there a way to fix this? Keep in mine I can't use a separate CSS file, and can't use <style> because it presents issues when being emailed on some clients.
     
  2. elppa macrumors 68040

    elppa

    Joined:
    Nov 26, 2003
    #2
    Code:
    a:link {
    color: #123123; 
    text-decoration: none;
    }
    Lose the quotes.
     
  3. definitive, Mar 14, 2011
    Last edited: Mar 14, 2011

    definitive thread starter macrumors 68000

    definitive

    Joined:
    Aug 4, 2008
    #3
    edit: ok figured out what was wrong, though it got rid of the underline altogether. i had to enter the text-decoration: none; in the <a tag as <a style="text-....
     

Share This Page