PDA

View Full Version : Visited page color in a spry CSS? How?


Roly
04-13-2010, 10:14 AM
:???: I was hoping somebody could point me in the right direction. I have created a spry menu bar in a template in a non editable region. I have successfully customized it to reflect the design of the website. However, I don't know how to make the menu bars link to a particular page stay highlighted when viewing the page, thus indicating which page is being shown.

Does anyone have any suggestions? Can this be done in CSS, I've tried to change the colors and nothing seems to work. I've tried putting a named anchor into the spry menu but I think i'm doing something wrong. I could make a new CSS in the spry but what would I call it? It seems standard but how does this work in a spry?

my site is www.kingarchitecten.nl (http://www.kingarchitecten.nl) see vertical and horizontal spry hover is red in ul.MenuBarVertical a.MenuBarItemHover, ... but visted page goes back to black

thanks
Roly

Also my triangles showing submenus don't appear in IE is there a reason for this?

DWcourse
04-13-2010, 01:41 PM
It is doable but it takes a bit of work.


In the Template, make the ID attribute of the <body> tag editable using the Editable Attribute function of Dreamweaver templates.
Assign a unique ID to the <body> tag of each page (for instance <body id=“home”> for the index.html page).
Define a style rule with multiple compound selectors (one for each menu item) with the properties that will identify the current page. The styles will combine the body id with a unique CSS class selector specific to each page (#home a.home, #contact a.contact, etc).
Back in the template, apply the correct style to each link in our menus (.home will be applied to the index.html link, .contact will be applied to the contact.html link, etc.)
Update all the pages based upon the changes to the template.

Roly
04-13-2010, 04:06 PM
wow, i'm gonna give it a try, thanks

I've been playing with this ID but won't this change the properties of the body? I just want to change the color of a singel spry menu bar, per page of course.

Will it change the selected text in my spry menu bar, so the highlighted rollover color is the same as the particular spry menu bar when viewing the page, thus indicating which page is being shown.
thanks for your time

Roly