PDA

View Full Version : Horizontal nav (troubles with the selected state)



elliot
01-08-2006, 03:50 PM
Happy New Year to you all :)

I'm in the process of creating a small website. I've downloaded a horizontal nav tweaking parts here and there so that it fits and has the same theme of the page.

i'm using the chrome nav:
http://www.dynamicdrive.com/dynamicindex1/chrome/#theme

Here's the nav on my page so far:
http://www.yorkorthodontics.co.uk/concept.html

I've created a selected state for the test page, though can't work out how to make the rollover colour white aswell for the d.blue selected background??

Could anyone tell me where I'm going wrong,

many thanks,
elliot

mwinter
01-08-2006, 11:02 PM
http://www.yorkorthodontics.co.uk/concept.html

I've created a selected state for the test page, though can't work out how to make the rollover colour white aswell for the d.blue selected background??The problem is the selector:



#wrap #menu .selected a:hover
This pattern will match a hovered link, which is a descendant of an element with a class attribute that contains the word 'selected'[1]. You should change it (and could shorten it) to:



#menu a:hover.selected
Alternatively, you could modify the rule with selector



#menu .selected
to:



#menu a.selected {
background: #3b63b3;
color: #ffffff !important;
}
and remove the two rules that follow.

Hope that helps,
Mike


[1] To continue: Which in turn is a descendant of an element with an id attribute that equals 'menu', which in turn a descendant of an element with an id attribute that equals 'wrap'.

elliot
01-15-2006, 12:02 AM
Hi Mike, sorry for a late reply to yours. Thanks very much for taking the time to explains this to me.

Just about to give it a go now :)

all the best