Results 1 to 5 of 5

Thread: how to remove underline from link

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to remove underline from link

    Hi,

    I am quite puzzeled by this problem. I am using dreamweaver template for my website. In some of the pages I have link to another site with underline. now i want to remove this underline. i changed text decoration to none but still its not working. Anybody please help me here. could it be possible because I am adding link in editable region of template...

    here is link to page...

    http://www.reedhee.com/hindi%20mov%2...id%20pt-2.html

    Thank you

  2. #2
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    You must type your script where the problem is. Sorry

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Put at the end of your css. This will remove all underlines from links. You're specifying specific ones right via ID.

    Code:
    a {
    text-decoration:none;
    }
    Corrections to my coding/thoughts welcome.

  4. #4
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thanks Bluewalrus....

    It worked like a charm...

    just curious about one more thing. Although i dont want to use it right now, I just want to have knowledge of it...

    Is there any way to remove underline from one particular link and not all the links of page???

    Thanks...

  5. #5
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Yes, like so:

    Code:
    <html>
    <head>
    <style>
    a{
    color:#333;
    }
    
    #external{
    text-decoration:none;
    }
    </style>
    </head>
    <body>
    Content...
    
    <a href="page.html">Normal</a> <!-- This link will be underlined as usual -->
    
    <a href="http://www.google.com" id="external">Google</a>
    </body>
    </html>
    This will make all links a certain colour, but the element with the "external" id will be the only one that is not underlined.

    You could also get multiple elements to not be underlined by using classes:

    Code:
    <head>
    <style>
    .links a{
    text-decoration:none;
    }
    </style>
    </head>
    
    <body>
    <div class="links">
    <a href="bla.html">Bla</a>
    </div>
    
    Content...
    
    <ul class="links">
    <a href="link.html">Random</a>
    </ul>
    </body>
    This will make any elements with the <a> tag inside any elements with the class "links" to not be underlined. You could be more specific and add:

    Code:
    <style>
    div.links a{
    text-decoration:none;
    }
    </style>
    Which will make only elements inside a div and that have the class "links" to not be underlined.
    Last edited by Schmoopy; 02-11-2010 at 10:29 PM.

Bookmarks

Posting Permissions

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