-
rollover links
hello,
i am using the below code for rollover links and my links are two colors.
once clicked, is there a code that i can add, so the color RED stays the same. that way, the user will know the link has been clicked.
many thnx
<style>
<!--
a:hover{color:red}
//-->
</style>
-
-
<style>
<!--
a:hover{color:red}
a:active{color:red}
a:visited{color:red}
//-->
</style>
hover- when the mouse is over, active- when the link is loading, visited- when you go back to this page and have already been to the page it links to.
That code has a few issues, though. Firstly, you should have all the states assigned, with those you don't want red set to, for example, blue, or something.
(Usually links should be blue... it tells people its a link. Sometimes, inexperienced users don't even know something isn't a link if it's not blue.)
Also, "red" isn't a color in html. It works sometimes, but the real code would be #FF0000
to explain: it's RRGGBB where it's red, green, blue.
The scale goes from 0 (zero) to F... 0,1,...9,A,B,...F
The pairs will always be the same. FF44AA, never 890FA2*
(*those actually exist, and might work, but the others are the 256 web safe colors... the others will have issues in some situations/browsers/computers/etc)
Also... I'm not css expert, but I'm not sure if :color: is right... I think it might be "text-color" instead.
And, this isn't too important, but having a semi-colon as color:red;* would be helpful to stick to the standards. (*or whatever you end up using)
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
thank you very much djr. it works perfectly now. i will check with netscape and apples too. so far, when i use color names, this little script works very nicely. this is how i choose the colors: http://www.oreilly.com/catalog/wdnut...lor_names.html
thnx again!
ash
-
-
Sure, the colors will work, but they aren't standard, and using the hex sytem (#FF0000) will give you a lot more flexibility.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks