Can anyone tell me how to active an anchor using css i want to know how to make the link active with different color or something as you like to say !!! regards,
Hi Jezek, But it jumps to another page and it shows color difference when we clicks, but what i m looking is, Suppose we have three links first link | second link | third link Now if somebody click on the first link other two link should show the blue color and first link should be different and now if somebody again click on the second link so the first one n the last one should have the blue and the second link should have different color I hope now it more clear my question regards,
You mean the various link states? a:link { background: transparent; color: #00F; } a:visited { background: transparent; color: #0FF; } a:hover { background: transparent; color: #F00; } a:active { background: transparent; color: #F00; } Code (markup):
Dear Dan, In this css script we know when any link visited will show the visited color in css and on hover will be different. I think you didn't read the second question related to this I asked.... regards,
You're right, I didn't see that. You can't do what you want with CSS, since you're talking about manipulating the behavior of the Web page. JavaScript however... I suggest you send a PM to deathshadow asking for his input on this (tell him I recommended you). With over 20 years of programming experience under his belt (and I don't mean just for the Web, but actual computer programming as well), he's the most qualified person on this forum who can answer your question on behavior.
dear dan, Thanks for your advice...as I heard it is possible by css...now the problem is from where I can search out deathshadow and where should I PM him, coz i m not familiar with forums !!! regards,
You rang? I'm not ENTIRELY certain I follow what's being asked - it sounds like you are asking about :visited - but I'm not sure. With your links, are you referring to having copies of each on every page like a menu, with each lighting up depending on which page you are on? If so, you need to tack a class in the menu item - I usually use 'current'. otherwise, it sounds like you are asking about :visited, except you want it to turn off (which doesn't work) - most people are confused by your using the word active, since that is a psuedoclass used for keyboard navigation - yet that is definately NOT what you are asking for. But again, I'm having a dog of a time making sense of the question.
Hi deathshadow, I didn't remember where I read about the a:focus method to show the active link. see visited link is what when the user already pass on that link but I m looking for if the guy is on a page we use to show by images for differentiate but I want to show the link is focus n that page's link is active. I hope you got my point. Best regards,
Could you repeat that in english, or could anyone else translate for me? I still can't figure out if he's asking for :visited, :focus or adding a class to each page to indicate the current one.