At 18:18 -0800 on 12/20/2013, John wrote about Re: [css-d] child problems with li?:

On Dec 20, 2013, at 6:00 PM, John <[email protected]> wrote:

> at this page: thinkplan.org the footer li nav appears to be being influenced by the header nav li CSS and I can not see whyŠany clues?

think I solved it; put the top nav inside the header, renamed those header nav, header li and that broke the influence, but I still don¹t see why the footer nav and footer nav li would take their marching orders from the top navŠ

am I right thinking this is an inheritance issue?

While I have not looked at your page to try to see why you might be getting the results you are, I can point at one other reason aside from inheritance - CSS Sepecifity. This refers to the issue of what happens if more than one CSS rule matches some HTML. In that case the most specific match (or matches if the is more than one - each applying and being cascaded) is used.

For example if you have a rule for nav li and one for ul li, both match a ul li enclosed in a nav and thus both will be applied in the order that occur in the CSS. If you do not want this to occur, you have to have some way of telling the difference in the two rules such as what the nav is enclosed in - IOW: Header Nav ... vs Footer Nav ... or something like that. By staring the rule with Header or Footer, you prevent a nav li rule from being applied to a nav ul, or other cases since only a header or footer section would be a match. Also a nav ol will override a nav li if one case is has the li enclosed in ul and the other in ol (the nav li would thus only apply to the ul case but not the ol one).


thank you,

John
______________________________________________________________________
css-discuss [[email protected]]
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/

______________________________________________________________________
css-discuss [[email protected]]
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/

Reply via email to