Closed (fixed)
Project:
Nice Menus
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Jun 2009 at 15:03 UTC
Updated:
9 Sep 2009 at 21:33 UTC
I have a nice menus override to override specific <li> and <ul>, but the more general theme settings override them. Is there a way to get the nice menus override to override everything that is less specific?
Comments
Comment #1
les limDid you write your own CSS rules to accomplish this? The custom CSS you write to override the UL and LI elements needs to be more specifically targeted than the general theme CSS that applies to those elements.
Comment #2
Daniel Norton commentedI want my theme style to apply generally and the nice menus overrides to only apply to nice menus.
This would work fine if the nice menus css was read after the theme css.
For example, in my theme style, I have "line-height: 1.25em", but for my nice menus, I want "line-height: 0.8em". I set this in my nice menus override specifically for nice-menus classes and ids, but it is subsequently modified by the more general settings in the theme's css.
More specific css files should be read after more general css files. Nice menus overrides are more specific than theme settings.
Comment #3
les limThe order that the CSS rules are read shouldn't make a difference. Greater specificity always trumps lesser specificity, no matter what the order. The only time that rule order matters is when two different rules have the exact same level of specificity.
You should be able to increase the specificity of your custom CSS rules for nice menus by prepending your particular nice menu's ID selector before those rules;
#nice-menu-1 li a {color: green;}You may already be doing this correctly, in which case you might check to make sure you're targeting the right element (i.e., you're writing rules for the "LI" when you really need to write rules for the "A"). If you're not using the Firebug extension for Firefox to inspect elements for how their CSS is being applied, you really should -- there's no better tool for debugging CSS.
Comment #4
add1sun commentedCSS issue with no more response. closing