1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Hyperlink without underline in html?

Discussion in 'CSS' started by Johnburk, Apr 11, 2006.

  1. #1
    Is there a way to get a hyperlink without having the text underlined?
     
    Johnburk, Apr 11, 2006 IP
  2. TruckTechniques

    TruckTechniques Peon

    Messages:
    382
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Using Frontpage, I just remove the underline formatting after I create the hyperlink :D
     
    TruckTechniques, Apr 11, 2006 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    a {text-decoration: none;}

    cheers,

    gary
     
    kk5st, Apr 11, 2006 IP
    Johnburk likes this.
  4. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,

    All browsers have a default stylesheet that they use to style elements. If a site specifies custom style rules, those are then applied over the top of the default stylesheet.

    Because there's no set standard on what should be in the default stylesheet, browsers all have their own defaults for things like spacing, text decoration, etc. Furthermore, the user can set things like fonts, default link colours, etc. These often get in the way when you are trying to achieve a unified look with CSS for your site. So a neat trick is to reset properties manually, so that you can start with a clean slate in your stylesheet.

    * {
      border: 0;
      margin: 0;
      padding: 0;
      text-decoration: none;
    }
    Code (css):
    is a good start.

    This reduces the amount of stuff you need in your other style rules, and helps to ensure a consistent look across different browsers :)

    - P
     
    penagate, Apr 12, 2006 IP
    Johnburk likes this.
  5. phd

    phd Active Member

    Messages:
    496
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    60
    #5
    In addition to that you can also have it for hover or visited link as
    a:link, a:visited, a:hover
    {
    text-decoration: none;
    }
     
    phd, Apr 12, 2006 IP
    Johnburk likes this.