Spry Menu - Visited state problem
by Nigel Milk
on
Dec 2, 2008 at 5:33:18 pm
Hi All
I’m a bit new to all this, so please be patent with my lack of knowledge to the correct terminology.
My problem is:
I am using a horizontal spry menu at the top of the page. This uses a different text style and design to the standard body link settings.
All works well on the Mac, but on the PC in Explorer once visited the spy menu default style is that of the body link visited style and I can’t work out how to fix it. Can anybody help please.
Cheers
Nigel
PS this is the problem site: www.heavenlyplanet.com
Re: Spry Menu - Visited state problem by Nigel Milk on Dec 3, 2008 at 9:33:42 am
Thanks Richard, but the problem is still there. It's the :visited colour that reverts back to the page style css setting?
I;m running two css files one for the page layout and general text styling in that I have all links set to verdana, Helvetica and different colours for the :a :hover :visited
I then have the spry css I have the font set to Helvetica and different colours for the :a :hover there is no option within the spry css to set the :visited state therefore once you have selected one of the links it reverts to the visited state set by the page layout .css
I’ve tried changing the font settings to all options, but still the page :visited state overrides?
Re: Spry Menu - Visited state problem by Richard Williams on Dec 3, 2008 at 1:38:29 pm
ok... so just to get this clear in my head...
You have buttons on top of your site heavenly planet...
The text is white
on hover, the text is orange
You want to have it so after you click on it... the text colour is.. lets say orange like the hover text...
So... you click on festivals and events, then the page shows the menu, with all white, except festivals and events which is now orange.
Now you click on music and arts... now all menu items are white, except music and art AND festivals and events which are orange. (because you have visisted both pages)
IS THIS RIGHT? :oS
Oh well, i'll post the answer to this anway, at least that way you will have a lot of answers on how not to sort your problem :o)
To achieve the above... first give your spry items an id.
so you add to the code a href="index.html" id="Home" > etc etc for your buttons.
Then, in the menubar css here... add something like...
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus, a#home:visited, a#festival:visited, a#anything else you have named:visited {
color: #334;
}
lol... if its not what you are looking for, spell it out as if you were talking to a really dumb, really stupid animal or something and i'll try again.
Look forward to not answering your question some more later...
Re: Spry Menu - Visited state problem by Nigel Milk on Dec 3, 2008 at 2:13:44 pm
Hi Richard I do appreciate your help, but this is so difficult to explain clearly…I’ll try
Body
Verdana 12pt reg
link = red
Hover = orange
Visited = same red as link
Botom nav bar
Verdana 10pt bold
link = red
Hover = orange
Visited = not set
Spry top nav bar (It’s a spy because later it will have drop-down menu choice)
The background graphic colour is the red.
Helvetica 13pt bold
link = cream
Hover = orange
Visited = option does not exist as DW standard. If I create my own it stops the rollover state working once visited.?
So the problem is the top nave bar take on the body visited colour once visited and because it’s red disappears on the background. If the body visited isn’t set to a colour then the top nav visited state is OK, but the body visited state takes on the browser default colour which is yuck.
Ideally I would like the following:
Body
Verdana 12pt reg
link = red
Hover = orange
Visited = red
Botom nav bar
Verdana 10pt bold
link = red
Hover = orange
Visited = red
Re: Spry Menu - Visited state problem by Richard Williams on Dec 3, 2008 at 2:53:14 pm
ok, i'll look this evening when i have dreamweaver infront of me
Don't sorry... we'll get it sorted of that i am sure! Generally, if it works on some computers or some browsers and not others, it is just the way in which the code is written (some browsers ignore errors, and others, IE for instance, wants to see everything perfect or it plays up. What you are doing is right, its just not right for IE. We need to find the medium of what is wrong for IE and will also work for the others.
In the meantime, can you do me a favour? Can you replace your index with the same thing, but without using a template or library item...? Its effort when i copy you code straight into dreamweaver, it locks the spry and everything out because it is a template object (or whatever)
That way as soon as i get in i can coopy it all over and have a play with it.
Re: Spry Menu - Visited state problem by Richard Williams on Dec 3, 2008 at 10:04:57 pm
OOOOOOOOOOOOOOOH!!!
Right...
I think, although i wouldn't bet on it, but i THINK i understand now.
Try:
Removing the Body commands from your home.CC completely, and instead, use
#pagetext a:Hover
#pagetext a:Visited
#pagetext a:link
That way you are not generalising to the whole BODY of the page, you are specifying the exact place. (you can use page content if you want, but i was wary this might do something unexpected elsewhere).
This should then automatically then resolve the issue of the spry menu...
Re: Spry Menu - Visited state problem by Nigel Milk on Dec 3, 2008 at 10:36:51 pm
Richard...What a brilliant workaround.
I tried "pagetext", but it didn't work, but "pagecontent" (being the editable section of the page) works - well-ish.
The only slight drawback is now the links on the page (pagecontent) loose their roll-over state once visited. No other side affects spotted as yet?
It's not perfect but much better than before and something I can live with for now.
I'm surprised that the DW bods haven't come across this? Anyway, you've been a great help and thank you for your time and effort, much appreciated - I hope to return the favour one day.
Re: Spry Menu - Visited state problem by Richard Williams on Dec 3, 2008 at 10:46:15 pm
yeh.. its a bit of a pain, although some might argue once you have marked something as visisted, why have the rollover effect... i dunno, and it might not be the final solution...? Perhaps you could feedback if you ever find a total solution... or perhaps someone might post here who knows?