As Ray has covered there is no reason for a hover change with the current code you gave, can you either post a link to the site in question or provide full code?

charlesugwuh
—
2010-02-20T21:03:05Z —
#4

Thanks.

@Rayzur: Could you kindly point me in the direction regarding what I should be looking for i.e. concerning inheritance? I've been trawling through firebug but I cant seem to find anything, but maybe I'm not sure what to look for.

@RyanReese: The site is not live yet, i'm testing it on a local server and everything's in my dreamweaver. I could post the code from when the menu starts if that would make sense i.e. show all the nestings.

Thanks you guys. I solved the problem. It really was an inheritance issue.

@RyanReese: Yes, the top margin I set for the main menu was the issue. The third (ul li a) declaration inherited the margin from the first. I simply added another zero margin to the css code [that defined the link where I was having the issue] to override it (See below):

@Rayzur: I'll also try this and see what happens. I think one just has to be really careful with the inheritance/override. I guess I need to pay more attention to the 'C' in 'CSS' next time.

Thanks again, 'ppreciate it.

RyanReese
—
2010-02-21T04:37:01Z —
#9

Glad you figured it out :). Inheritance issues can be tricky but firebug can show you the specificity of each element (I mean which has more weight)

PaulOB
—
2010-02-21T14:21:42Z —
#10

Just to clarify some terms (without being too pedantic)

I hear "inheritance" bandied about a lot but most times it is quoted out of context. Not all properties are inherited and margins and padding are not inherited otherwise there would be utter confusion

The rules set earlier in the document will cascade through to the elements concerned and where there are conflicts those which are applied will be determined by "specificity". (The full rules can be found here.)

Inheritance is a mechanism that’s separate from the cascade: inheritance applies to the DOM (Document Object Model) tree, while the cascade deals with the style sheet rules. However, CSS properties set on an element via the cascade can be inherited by that element’s child elements.

In most cases where conflicts are concerned the reason will be that rules have been set earlier in the document and are still in force on the element concerned and has nothing to do with inheritance (in most cases).

For example:

a{background:red}
#test a {color:red}

The anchor within the id of test will be red on a red background not because it has inherited anything but because you have told it earlier what it should be. (In CSS backgrounds are not inherited but are transparent by default.)