Ask Experts Questions for FREE Help !
Ask
    ittle's Avatar
    ittle Posts: 95, Reputation: 1
    Junior Member
     
    #1

    Jul 6, 2006, 05:41 PM
    Html link help
    Okay so I'm making my website, but for example on my index.html I have a link for home.html, the word "home" is supposed to be yellow and not underline, but instead it is blue and underlined. Need help!
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #2

    Jul 7, 2006, 12:41 AM
    I'll do this the bad way - I'm writing up a CSS guide for this site over the weekend so check back to this category later if you want some guidance on doing it the proper way.

    In between the <head> tags of your HTML page put this:
    Code:
    <style>
    a {
        text-decoration: none;
        color: yellow;
    }
    </style>
    That will make all links on your page yellow and not-underlined. If you want just certain links coloured yellow, place the following between your <head> tags:

    Code:
    <style>
    .link {
        text-decoration: none;
        color: yellow;
    }
    </style>
    Then make your HTML links look like this:
    Code:
    <a href="home.html" class="link">a link</a>
    Just a quick note - Removing the underline on links if often "frowned upon". It makes it quite hard to tell what is a link and what isn't.
    NeedKarma's Avatar
    NeedKarma Posts: 10,635, Reputation: 1706
    Uber Member
     
    #3

    Jul 7, 2006, 02:47 AM
    Ummm... is it possible it's blue because it's a followed (already clicked) link?
    ittle's Avatar
    ittle Posts: 95, Reputation: 1
    Junior Member
     
    #4

    Jul 7, 2006, 01:31 PM
    Quote Originally Posted by NeedKarma
    Ummm...is it possible it's blue because it's a followed (already clicked) link?
    I like your answer but no. check it out! At www.littledan1.com
    (the page the link is directing to hasn't been built so just look at my scripting and see what the problem is
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #5

    Jul 10, 2006, 12:25 AM
    Dan, that link won't work. If the page/link isn't there we can't look at your scripting.

    Secondly, my first answer will colour the links like you asked.
    ittle's Avatar
    ittle Posts: 95, Reputation: 1
    Junior Member
     
    #6

    Jul 10, 2006, 07:08 PM
    ACTUALLY IT DID. I wrote the style scripting you told me and it worked. Look at it.
    BBeepTX's Avatar
    BBeepTX Posts: 6, Reputation: 1
    New Member
     
    #7

    Jul 21, 2007, 12:21 AM
    Here is an old HTML code way to do links with forced color... use Font tags


    <a href="home.html"><font color=yellow>HOME</font></a>
    ittle's Avatar
    ittle Posts: 95, Reputation: 1
    Junior Member
     
    #8

    Jul 28, 2007, 12:44 PM
    My bad, the link doesn't work, cause I was lazy and I lost the domain name.
    nickfromstrood's Avatar
    nickfromstrood Posts: 22, Reputation: 4
    New Member
     
    #9

    Jul 28, 2007, 01:46 PM
    Not too sure about the underlining, but as for colour I would put the following in my body tag to make links yellow:

    <body alink="yellow" vlink="yellow" link="yellow">

    this will cover:

    A(ctive) links - as you click on them

    V(isited links

    and also unclicked links

    hope this is some help :s
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #10

    Aug 2, 2007, 07:05 AM
    The first set of styles will change all links that do not have a class specified in the anchor tag. The second set will only be applied to those links that have the class value set to myLinkStyle. If you are going to remove the underline from a link you should make sure that it's obvious to the user that there is a link there. What we will typically do is surround the link with [ ].

    Oh... and sorry for the ugly colors... I just chose stuff off the top of my head.
    Your styles would contain:
    Code:
    <style>
    a:link {
      color: green;
      text-decoration: none;
    }
    a:visited {
      color: yellow;
      text-decoration: none;
    }
    a:hover {
      color: green;
      text-decoration: underline;
    }
    a:active {
      color: green;
      font-weight: bold;
      text-decoration: none;
    }
    
    a.myLinkStyle:link {
      color: cyan;
      text-decoration: none;
    }
    a.myLinkStyle:visited {
      color: orange;
      text-decoration: none;
    }
    a.myLinkStyle:hover {
      color: cyan;
      text-decoration: underline;
    }
    a.myLinkStyle:active {
      color: cyan;
      font-weight: bold;
      text-decoration: none;
    }
    </style>
    And then your links in the body:
    Code:
    This is a link to [ <a href="http://www.yahoo.com">Yahoo</a> ]<br>
    This is a link to [ <a href="http://www.google.com" class="myLinkStyle">Google</a> ]

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Css vs. Html [ 9 Answers ]

Ok, I thought there was a thread onthis but I couldn't find it. I wanted to know when I should use CSS and when I should use HTML? I noticed websites that are using CSS are still using HTML, psecifically tables, to do some of there layout. I thought that was a no, no since CSS came out. I am...

Html help ! [ 5 Answers ]

?? I have a website for my in laws villa in Florida which I will shortly be updating, I have seen whilst browsing the net another site: - www.users.waitrose.com/~elainenicol When you click on 'the cottage' you are presented with a floor plan, by clicking on the room you then move to the...

Html [ 2 Answers ]

hi, I want to create web pages which should independent of screen resolution, i.e. I develop the page in the screen size 800x600 but when I viewing it in the screen resolution 1024 x 764 then positioning of the page and component on it changes i.e layout changes. How can I prenevt this. Please...

Html [ 1 Answers ]

Howdy I have some files, all of which are .jpg I have FTP them to an AOL web server. Questions: What extension do they now have? If not HTML, how do they get to be HTML which is What I am wanting? And, yes, I am new at this.


View more questions Search