Hyperlink Style - External CSS

Discussion in 'CSS' started by defyet, Jun 3, 2010.

  1. #1
    Hi,

    Im trying to place links on my page but i want the hyperlink to look the same as the rest of the text, so there is no colour change or underline, i use external css and i cant get it to work.

    Can someone please tell me the code i need to use in my css file and the code i need to use in my html to achieve this.

    http://www.superiorshine.com.au/aboutus.html
    http://www.superiorshine.com.au/main.css

    Thanks
     
    defyet, Jun 3, 2010 IP
  2. digital29

    digital29 Peon

    Messages:
    462
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    a {
    text-decoration: none;
    color: (the color of the text);
    }
     
    digital29, Jun 3, 2010 IP
  3. defyet

    defyet Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That wont work because if i do that then it will change hyperlink on other areas of my site to that, i need to to be specific to certain hyperlinks.
     
    defyet, Jun 3, 2010 IP
  4. Lipgut

    Lipgut Member

    Messages:
    328
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    35
    #4

    .text_link { 
    text-decoration: none;
    color: (the color of that text);
    }
    HTML:

    -------------------------

    <a href="url" class="text_link">blah </a>
    PHP:

    that should work if I'm not mistaken.
     
    Lipgut, Jun 3, 2010 IP
  5. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well you could either give the links a new class altogether as shown above, or if it is all links in a certain element then you can refer to it like:

    #sectionname a { property:value; }

    You just need to find the easiest way to select the links you require from your CSS stylesheet.

    Search around for CSS selectors for more information.
     
    wd_2k6, Jun 4, 2010 IP