Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    New Coder
    Join Date
    Sep 2002
    Location
    Brooklyn, NYC
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I make my links change a color other than the default one after clicking

    Hi I have some links on my page that are blue. When you click a link, go to the site, then return to my page, the link is now purple.
    How do I make it white? Pretty simple, I know... sorry

    I just finished my 1st site. Just nitpicking.

    cheers.
    TL

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    place these in your <body> tag

    link="blue"
    alink="blue"
    vlink="blue"

    Example: <body link="blue" alink="blue" vlink="blue">

    link specifies the color of your hyperlink
    alink is the active link
    and vlink is the color of the visited link, the color after you have been to that page

    to change the color of the link while your mouse is over it or hover link you will need CSS

    place this in your <head></head> tag

    <style type="text/css">
    a:hover{color:blue}
    </style>


    there is alot more you can do with hyperlinks, if you want to know just ask
    Last edited by cg9com; 10-21-2002 at 06:49 AM.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The link, vlink and alink attributes are deprecated; if you're going to use CSS (which is a great idea!), might as well use it for the other color settings, too:
    Code:
    <style type="text/css"> 
    a:link {color: blue}
    a:visited {color: green}
    a:hover {color: red}
    a:active {color: red}
    </style>
    Colors chosen are of course completely arbitrary. By the way: the order in which the pseudo-classes (because that's what they are) are given here is the correct one; :hover should follow :link and :visited, and :active should follow :hover.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you.

  • #5
    New Coder
    Join Date
    Oct 2002
    Location
    Go CANADA!
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use HEX over "words"

    Just a note, better to use the HEX values over words when specifying the colours

    i.e.
    ...color: black

    ...color: #000000

    ^.^

    And if you want an easy CSS program, it's free.
    www.download.com.com

    Called "Topstyle"
    http://download.com.com/3120-20-0.ht...yle&tg=dl-2001
    Last edited by Revelle; 10-21-2002 at 04:30 PM.
    Be ReActive.

  • #6
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hex values are better for specifying a more exact color you want
    words are mostly used for older browsers
    check this out: http://www.cg9com.web1000.com/colortable.htm

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Actually, color names generally don't make any difference.

    The HTML specification has I believe 16 color keywords. In practice, there are a bunch that browsers accept, and these are valid in the SVG specs.

    Currently, you can define colors in several ways:

    • colorname
    • #rrggbb
    • #rgb
      which is converted to #rrggbb --> #123 == #112233
    • rgb(r, g, b)
      where r, g, and b are in the domain of [0, 255]
    • rgb(r%, g%, b%)
      where r, g, and b are in the domain of [0, 100]


    Also, "transparent" is a valid color keyword.

    When CSS3 gets to candidate recognition, you'll also have these color types to wield:

    • hsl(hue, sat, light)
      where hue is [0, 360], and sat and light are [0%, 100%]
    • rgba(r, g, b, a) where r, g, and b are the same before (0-255 or 0%-100%) and a is [0, 1] and represents the alpha channel value of the color.
    • hsla(h, s, l, a)
      where h, s, and l are the same as before, and a is [0, 1] and represents the same as it does in rgba()


    I hope that clears up some confusion.
    (Or added to it, muahahaha )
    Last edited by jkd; 10-21-2002 at 09:13 PM.

  • #8
    New Coder
    Join Date
    Oct 2002
    Location
    Go CANADA!
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *ahem

    LOL
    Be ReActive.

  • #9
    New Coder
    Join Date
    Jun 2002
    Location
    Sydney Australia
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    What application does : transparent have?

  • #10
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Basically explicitly declaring a background to be transparent. By default, they should be anyway...

  • #11
    New Coder
    Join Date
    Sep 2002
    Location
    Brooklyn, NYC
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What do you mean by transparent? Do you mean that it would automatically lie behind any content?

    On my site....my site
    I want to make the white background around the grey rectangle link bar black (the skinny are of white around it on the left). Also, the white horizontal area above the headings and text of each page black (the area directly below my nav bar.)

    Basically...All I need to know is how to get the background color to not be behind the text...(the whole table it's in in DW)

    possible?

    cheers
    TL
    Last edited by lost; 10-22-2002 at 03:28 AM.

  • #12
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you dont have to cross questions

    perhaps you should read a few tutorials
    http://www.javascriptkit.com/
    Last edited by cg9com; 10-22-2002 at 05:24 AM.

  • #13
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oOOoh senior member status

    i feel old, where are my discounts!

  • #14
    New Coder
    Join Date
    Sep 2002
    Location
    Brooklyn, NYC
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry about crossing questions...I just thought my post in General web building was getting off topic so I thought I should post the same in the correct forum.

    Which tutorial has what I am looking for... (background color question)?

    cheers
    TL

  • #15
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you should start with some beginner stuff.
    learn the basis of html.
    your website looks great, but you seem to be lacking some knowedge on the basics.

    your html says:
    <body link="black" alink="blue" vlink="black">
    <body bgcolor="#CCCCCC" (ect.)

    two open body tags is one too many.
    and you havnt specified a text color.


  •  

    Posting Permissions

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