Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text-decoration:none not working

    <style type="text/css">
    <!--
    .style2 {
    font-family: Arial;
    color: #00FF00;
    font-weight: bold;
    font-size: 18px;
    text-decoration:none;
    }
    .style4 {color: #FFFFFF}
    .style5 {color: #99FF33+5;
    text-decoration:none;
    }
    .style6 {
    font-family: Arial;
    font-size: 11px;
    color: #202020;
    text-decoration:none;
    }
    .style8 {font-family: Arial; font-size: 11px; color: #666666; font-weight: bold; text-decoration:none;}
    .style10 {font-family: Arial; font-size: 11px; color: #202020; font-weight: bold; text-decoration:none; }
    .style11 {
    font-family: Arial;
    font-weight: bold;
    color: #990000;
    font-size: 17px;
    }
    .style12 {
    font-family: Arial;
    font-size: 11px;
    font-weight: bold;
    }
    .style13 {font-family: Arial; font-size: 12px; }
    .style14 {
    font-size: 12px;
    font-weight: bold;
    }
    .style15 {
    color: #000000;
    font-weight: bold;
    }
    .style17 {
    color: #000000;
    font-size: 11px;
    font-family: Arial;
    }
    .style19 {
    font-family: Arial, Helvetica, sans-serif;
    color: #00FF00;
    font-weight: bold;
    font-size: 24px;
    }
    .style21 {
    color: #00FF00;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    }
    .style22 {
    font-family: Arial;
    font-size: 14px;
    color: #FFFFFF;
    text-decoration:none;
    }
    .style22 a{
    font-family: Arial;
    font-size: 14px;
    color: #99FF00;
    text-decoration:none;
    }
    .style23 {
    font-family: Arial;
    font-size: 10px;
    }
    .style26 {
    color: #99FF33;
    font-size: 25px;
    }
    -->
    </style>

    <td height="25" align="right" bgcolor="#7ce902"><span class="style2"><span class="style5"><span class="style6"><a href="test.html">Web Version</a> –<a href="test.html"> Privacy</a> – </span></span></span><a href="test.html"><span class="style10">Unsubscribe</span></a><span class="style8">&nbsp;&nbsp;&nbsp;</span></td>
    </tr>

  • #2
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    Code:
    a { text-decoration: none; }
    /* remove underline from any link */
    is all you need.

    and what do you mean, it's not working?

  • #3
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by met View Post
    Code:
    a { text-decoration: none; }
    /* remove underline from any link */
    is all you need.

    and what do you mean, it's not working?
    This is exactly the right approach.

    The reason that it wouldn't be working the other way is that the OP was styling the span that contained the <a> tag, not the <a> tag itself. It's like putting a <p> element inside of a div, giving the div a bottom padding and margin of zero and then still seeing the default bottom padding from the <p> tag. The default behavior of the child element was still present so removing it from the parent would naturally have no effect.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •