Getting rid of the blue color of links

Discussion in 'HTML & Website Design' started by Kngavl, Feb 25, 2008.

  1. #1
    How do I get rid of that blue color for a link?
    <div align="center"><span class="style17"><a href="kitchen.html">Kitchen</a></span><br class="spacer" />

    Thats the code.
    I want it to be set at a certain hex color and it is, until I make it into a link. How do i keep it as a link but also retain the original hex color?
     
    Kngavl, Feb 25, 2008 IP
  2. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
  3. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you for that blissful answer mate, however thta does not help me as it was the first place I looked. Try again.
     
    Kngavl, Feb 25, 2008 IP
  4. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #4
    You looked at G and didn't find it ?? You mean you didn't find how to change the color of a link????
     
    Codythebest, Feb 25, 2008 IP
  5. ShaneC

    ShaneC Peon

    Messages:
    387
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The easiest way to do things like that is through css. I'm guessing your not using a style sheet though?

    To do it through styles you will see something like this somewhere on the page:
    <style type="text/css">
    <!--
    .style17 {color: #FFFFFF}
    -->
    </style>

    and then you have the link:
    <div align="center"><span class="style17"><a href="kitchen.html">Kitchen</a></span><br class="spacer" />

    see how it says style17? find style17 in the style section and change the corresponding color. or make a new style.
     
    ShaneC, Feb 25, 2008 IP
  6. stoli

    stoli Peon

    Messages:
    69
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Either use a style sheet:
    <style type="text/css">
    .style17 a {
      color: #ff00ff;
    }
    </style>
    
    <div align="center"><span class="style17"><a href="kitchen.html">Kitchen</a></span><br class="spacer" />
    HTML:
    or you could use an inline style:
    <div align="center"><span class="style17"><a href="kitchen.html" style="color:#ff00ff">Kitchen</a></span><br class="spacer" />
    HTML:
     
    stoli, Feb 25, 2008 IP
    Kngavl likes this.
  7. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #7
    Or the <FONT COLOR="#fdd700"> ...OR just by Googeling :)
     
    Codythebest, Feb 25, 2008 IP
  8. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    :) Tried Font color before I asked didn't work, tried and no result. I google everything mate before it's asked.
    To the others, thanks. I am using a css sheet but it's my first time and this is an isolated link that is turning blue. All other links on the page retain their original color, thanks though will try the css codes.
     
    Kngavl, Feb 25, 2008 IP
  9. stoli

    stoli Peon

    Messages:
    69
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #9
    stoli, Feb 25, 2008 IP
  10. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Well the inline style made it work, the color was already set in the css. I don't know why it changed when adding the link.
    Alls settled now, thanks mates.
     
    Kngavl, Feb 25, 2008 IP
  11. ShaneC

    ShaneC Peon

    Messages:
    387
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It makes sense now, it happened because it's the only link with a style, the rest are controlled by css. If you delete the style from the link it will be controlled by the css again.
     
    ShaneC, Feb 25, 2008 IP
  12. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #12
    On first level...
     
    Codythebest, Feb 25, 2008 IP
  13. innovati

    innovati Peon

    Messages:
    948
    Likes Received:
    63
    Best Answers:
    1
    Trophy Points:
    0
    #13
    well, has anybody here heard of google code? they have a whole search engine tailored to just looking for snippets of code! pretty cool eh? our friend up there may not have been too far off (although he didn't know it at the time)

    I recommend the W3Cschools, they made the standards, they explain them best!

    best of luck in the future, innovat!
     
    innovati, Feb 25, 2008 IP
  14. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #14
    W3Schools has NOTHING to do with the W3C, it's just that the domain name was acquired by some LUCKY people.

    Anyway, the thread starter's code just reeks of bloat - there should be no need to wrap an anchor inside a span that's inside a DIV like that.

    Kngavl, if you don't mind me asking, what does your entire page look like?
     
    Dan Schulz, Feb 25, 2008 IP
  15. Kngavl

    Kngavl Peon

    Messages:
    964
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Not my design, someone else's and I'm just messing with bits of code and such. Gonna finish up my beta for it in a couple days once I'm done and then my code will be the one for my site spartansaving.

    Btw I have never used CSS before and my coding is just basic html haha, pretty brutal and what I do is quite sloppy.
     
    Kngavl, Feb 25, 2008 IP
  16. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Ah. That would explain a few things. Anyway, if you ever want to take up CSS, just let me know and I'll give you some quality resources that'll help get you started. :)
     
    Dan Schulz, Feb 25, 2008 IP
  17. komickaze

    komickaze Well-Known Member

    Messages:
    41
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    118
    #17
    Here's an example of what you can do.

    <style type="text/css">
    A:link {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none}
    A:hover {text-decoration: underline; color: red;}
    </style>
     
    komickaze, Feb 26, 2008 IP
  18. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #18
    (just wanted to let you have the order wrong - it should be link, visited, hover, active, focus - LVHAF)
     
    Dan Schulz, Feb 26, 2008 IP