Chrome’s developer tools work: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/
]]>(1) some things I’m doing SIMPLY AREN’T WORKING even though I’m copying the CSS in the developer toolbar. I must be missing something, but rather than hack on it more, I think I should now look for a reference.
(2) it’s not obvious what level of generality or specificity to use in a selector … do I make it specific, and then find out later it breaks sometimes? Or do I make it general, and then find out it messes with other parts of the website?
(3) It’s not obvious from hacking on it when I’ve finally found and handled every situation
(4) the submenus are dynamic and I can’t figure out whether their markup is changed by JS when they fire.
]]>But, I’ll ask a specific q. Below is the markup for my menus, copied from the developer’s tools window. To keep it short, I omitted some details that I think aren’t relevant.
One style I want to apply is changing the background color of the menu buttons.
This worked on the top-level buttons:
li.menu-item a {
color: #fff;
background-color: #18ddb1;
}
But the background color of the sub-menus is still white, unchanged from the original. I tried using any or all of the following selectors to add a new background color to the sub-menus:
li
li.menu-item
.sub-menu li
.sub-menu a
.sub-menu span
and similar combinations. Nothing changed the background color of the submenu (although some of them seemed to affect the area right around the text, just not the whole sub menu)
]]><nav id=”genesis-nav-primary”
class=”nav-primary genesis-responsive-menu”>
<div class=”wrap”>
<ul id=”menu-mine”
class=”menu genesis-nav-menu menu-primary js-superfish sf-js-enabled
sf-arrows”
style=”touch-action: pan-y;”>
<li id=”menu-item-??”
class=”menu-item menu-item-type-post_type
menu-item-object-page menu-item-??”>
<span itemprop=”name”> …menu item text… </span>
<button class=”sub-menu-toggle>
</button>
<ul class=”sub-menu”>
<li id=”menu-item-??” class=”menu-item menu-item-type-post_type
menu-item-object-page menu-item-??”>
<span> .. menu item text .. </span>
</div>
</nav>