PDA

View Full Version : Alternative a:focus ?



MaGiCSuN
February 3rd, 2009, 17:22
Hi,

I'm looking for a way to achieve the a:focus effect on a link, but more advanced than that.

For example, I want a link to stay colored in a certain color, even when I visit it's sublinks. I want users to see where they are on the page.

a:focus makes that happen, but only when the focus stays on that link offcourse. When click somewhere within the page the link returns to normal state, because it has lost it's focus.

Is there any script etc, where you can tell the script to make the link "contact" green for example when visiting "contactform" "route" and "contact information".

I must note that the sublinks are inside a div (referring to my other thread, DIV onclick).

Thanks !

Love,
Mirna

MaGiCSuN
February 9th, 2009, 18:11
Got it: http://www.alistapart.com/articles/keepingcurrent/

However, this works great for my mainmenu.
But how would I make this work for my main AND submenu?

Example page:
http://www.sjante.nl/chateau/welkom.php

I want when you click on "geschiedenis" and then on a submenu link (on the left) that it also gets the same color as "geschiedenis". (right now the links don't lead to an excisting page, i'm aware of that)

Can this be done through PHP?

Thank you !

Love,
Mirna