Results 1 to 9 of 9

Thread: Changing link colors?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Changing link colors?

    Does anyone know if the color of a link used as an anchor can be changed? As it is now the link is displayed purple and when it is clicked it is still purple. I thought links were supposed to turn blue when moused over.

    Here is my link
    Code:
    <li><font size="1" face="Lucida Bright"><a href ="C:/My Documents//page2.htm#page2">This will take you to page 2</a>
    And here is the anchor
    Code:
    <p><a name = "page2"><font face="Lucida Bright" color="#00FF00" size="6">Welcome to page two</font></a></p>

  2. #2
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    You can use a Style Sheet for that, put this before your BODY tags.

    <STYLE>
    A {color:'purple'}
    A:hover {color:'green'}
    </STYLE>

    There are other properties you can change too, like font-size, font-weight, which might help you out also. I can't remember off hand any other Style Sheet state properties, Hover (mouseover) and plain are all I ever use. You could find them with a search on the web I bet.

  3. #3

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Hey ill check it out. Im not sure if i want to mess with style sheets yet. But maybe i better since the WC3 suggests it.

  4. #4

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    I know in the BODY tag you can specify Link, VLink or ALink
    = "#rrggbb" but these seem to be not what i want. I always thought a link was supposed to change color when rolled over?
    The dam thing is purple.

  5. #5
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    I always thought a link was supposed to change color when rolled over?
    The dam thing is purple.
    May be u are so used to vbforums that u strongly believe so.
    By default a visited link is purple.

  6. #6
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    Do you know any JavaScript? You could embed a onMouseOver= thing in the Anchor tag.

  7. #7
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    Originally posted by thinktank2


    May be u are so used to vbforums that u strongly believe so.
    By default a visited link is purple.
    correct, and there is no change of color but u can set it to underline when hovered over.

    hey, Dilenger4, if u want to use that CSS then here is a more detailed version of that one of " TheGoldenShogun" :

    Code:
    <STYLE> 
    A:Link {color: #000000; font-family: verdana; font-size: 12px} 
    A:Hover {color: 'red'; font-family: verdana; font-size: 12px} 
    A:Visited {color: #000000; font-family: verdana; font-size: 12px} 
    </STYLE>
    this will hilite all your links red when hovered ove and display them as black when just sistting there or if theyt have been visited.

    NOTE: it is also possible to have:
    Code:
    <STYLE> 
    A:Body {color: #000000; font-family: verdana; font-size: 12px} 
    </STYLE>
    but it will not change text in tables and in that case u can use:
    Code:
    <STYLE> 
    A:Table {color: #000000; font-family: verdana; font-size: 12px} 
    </STYLE>
    well, i hope this is of some help to you.

    ME!

  8. #8

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    TheGoldenShogun
    Do you know any JavaScript? You could embed a onMouseOver= thing in the Anchor tag.
    No i don't really know any java script yet. I know Java pretty well though. Java script just seems to be coded a little diffrently. onMouseOver sounds like the way to go though. So i guess ill go with that. Thanks for the help guys. ubunreal69: I wrote down your code for future refrence so when i switch over to style sheets ill know what to do.

  9. #9
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    thats cool. i dont know all that much but i like to help people with what i do know.

    ME!

Posting Permissions

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



Click Here to Expand Forum to Full Width