Susan Grossman wrote: >> Why aren't my active and visited link CSS commands working on my >> portfolio page? I want people to know that they've already clicked >> on an image.
(I think the OP meant "clicked on a link to see an image", as the links are text links, as far as I can see, though it is not obvious at all which constructs are links on the page.) >> http://www.draftingservices.com/portfolio.html > > Believe it's the onclick event that's at issue. You're not actually > going to a page, so you haven't "visited" and the links don't change. More exactly, when the onclick event handler ends with return false it aborts normal link processing, i.e. the link is not followed, in HTML terms. A scenario that avoids this uses normal HTML links with target attribute specifying an iframe element where the images are displayed. When using Javascript pseudolinks, as on the current page, one might simulate link states e.g. by using, in the onclick event handler, additional code like this.setAttribute('class','visited') and using the selector .visited instead of :visited. The "visited" state created that way would be different from normal visited state. In particular, when a page is opened, no links would be in "visited" state, even if they were clicked on very recently. -- Yucca, http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
