Click to See Complete Forum and Search --> : Stuck on Links


Four_of_Five
02-15-2003, 03:29 PM
I'm stuck again :( my links change color on hover but when I click on them, they get uhmm...stuck or frozen on their "on hover" state??? why is this so??...pls. see attached txt script...

i thought by just inserting class="---" on each link I could have them change color on mouse-over...it worked b4 on another much more complex script...now...

Any ideas...i thought i had it solved already...aaargggh..

Zach Elfers
02-15-2003, 05:12 PM
<style type="text/css">

a.className:active {
color:color;
}

</style>

Hope that helps.

Four_of_Five
02-16-2003, 12:27 PM
Thanks, but uhmm kinda very new at this CSS thing...can you please elaborate a bit? :confused:

Zach Elfers
02-16-2003, 07:41 PM
Sorry.

In the <head> section put:

<style type="text/css">

a:link {
color:#ff0000;
text-decoration:none;
}
a:visited {
color:#ff0000;
text-decoration:none;
}
a:hover {
color:#000077;
text-decoration:overline underline;
}
a:active {
color:#008800;
text-decoration:underline;
}

</style>

a:link = this is what the link will look like before it is clicked
a:visited = this is what the link will look like after it has been clicked
a:hover = this is what the link will look like when the mouse is over it
a:active = this is what the link will look like while it is being clicked and when it has that dotted outline

color = this is the text color of the link
text-decoration = this is the text decoration of the link. You can change the decoration to italic, underline, overline, or a combination of those. To make the text bold, you have to add another property, font-weight:bold;

PeOfEo
02-17-2003, 03:44 AM
That affects every link on your site though, so keep that in mind. CSS is a powerful tool it can do way more then links. It can also be used to make your scroll bars, borders, etc. Its nice.