...

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



lost
10-21-2002, 06:33 AM
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

cg9com
10-21-2002, 06:46 AM
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 :)

ronaldb66
10-21-2002, 12:41 PM
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:

<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.

cg9com
10-21-2002, 02:54 PM
Thank you. :)

Revelle
10-21-2002, 04:27 PM
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.html?qt=topstyle&tg=dl-2001

cg9com
10-21-2002, 08:31 PM
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

jkd
10-21-2002, 09:11 PM
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 :cool: )

Revelle
10-21-2002, 09:53 PM
*ahem

LOL

Araich
10-21-2002, 11:29 PM
What application does : transparent have?

jkd
10-22-2002, 01:24 AM
Basically explicitly declaring a background to be transparent. By default, they should be anyway...

lost
10-22-2002, 03:04 AM
What do you mean by transparent? Do you mean that it would automatically lie behind any content?

On my site....my site (http://www28.brinkster.com/loststudios)
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

cg9com
10-22-2002, 05:15 AM
you dont have to cross questions :)

perhaps you should read a few tutorials
http://www.javascriptkit.com/

cg9com
10-22-2002, 05:15 AM
oOOoh senior member status

i feel old, where are my discounts! :cool:

lost
10-22-2002, 06:49 AM
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

cg9com
10-22-2002, 04:25 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum