I am working on a site that uses menus that are includes. I have been wrestling with a way to highlight the link to the page you are on in the included menu. I have a way that works, but it's kind of labour intensive - every page needs a unique bit of style in the header. I'm hoping you guys can suggest something a bit more global.
Here is the site and the related style sheets. http://www.cantoraccess.com http://www.cantoraccess.com/css/ca.css http://www.cantoraccess.com/css/menu.css http://www.cantoraccess.com/css/ie6-hacks.css http://www.cantoraccess.com/css/ie7-hacks.css An example: here is a landing page http://www.cantoraccess.com/publications/macros.shtml which uses the included list of links http://www.cantoraccess.com/includes/pub_macros_articles.shtml The list of links is also included in all the articles listed on the landing page as a side bar menu, for example http://www.cantoraccess.com/publications/macros_2008_resna_library_download.shtml (publications that only appear in print are turned off. These show up on the landing page, but not in the menus.) Currently none of the pages on this site that have included menus have any highlights in those menus to show what page you are on. I have just read an article on askthecssguy.com called "Showing Hyperlink Cues with CSS" http://askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html I used his samples to come up with this .menu a[href $='test.shtml'] { padding-left: 28px; background: transparent url(../images/braille_arrow.jpg) no-repeat top left; font-weight : bold; color : #660000; } which I have placed in the head of http://www.cantoraccess.com/publications/test.shtml The links in the "Related Publications" menu on this page are an include http://www.cantoraccess.com/includes/testinclude.shtml The link to "test.shtml" is highlighted on this page because of the style in the <head>. Is there a way to write the style so that it will work without putting a style unique to each page in the head of that page? Can CSS compare the href to the URL and if they match, highlight the href? If every body tag has a unique id and I add a matching id to the link to that page, could I somehow get the browsers to compare that? thanks guys! Sandy ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] 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/