Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Drop Down Menu - How to target Child Element?
    text
    copied!<p>Page in Question: <a href="http://dev.cd-duplication-in-the-uk.com/disc-printing/screen/" rel="nofollow">http://dev.cd-duplication-in-the-uk.com/disc-printing/screen/</a></p> <p><a href="http://jsfiddle.net/7maSx/2/" rel="nofollow">http://jsfiddle.net/7maSx/2/</a> -- I would like the menu with the blue sub menu to always show</p> <p>I have a 100% CSS Menu similar to this example which has been developed into a WordPress 3.0 menu for a theme I've been developing...</p> <pre><code>&lt;nav class="main"&gt; &lt;ul&gt; &lt;li&gt;Main 1 &lt;ul&gt; &lt;li&gt;Sub 1&lt;/li&gt; &lt;li&gt;Sub 2&lt;/li&gt; &lt;li&gt;Sub 3&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Main 2 &lt;ul&gt; &lt;li&gt;Sub 1&lt;/li&gt; &lt;li&gt;Sub 2&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Main 3&lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; </code></pre> <p>With the following (relevant) CSS for form/function</p> <pre><code>nav.main ul li { display: inline; float: left; list-style: none; } nav.main ul:first-child { position: relative; }/* for the position of sub menus */ nav.main li ul { display: none; position:absolute; top: 30px; left: 0px; z-index: 10; } nav.main li:hover ul { display: block; } </code></pre> <p>...and this CSS to color the Main (parent) and the Sub(child) page which the user is on.</p> <pre><code>ul.menu li.current-menu-parent a {color: #036;} ul.sub-menu li.menu-item a {color: #999;} ul.sub-menu li.current_page_item a {color: #036;} </code></pre> <p>I'm looking for a way to keep the Sub Menu open if one of the li elements is the .current_page_item</p> <p>Right now both the Parent and Child li menu elements have the correct styling, but I can't figure out how to keep the sub-menu open.</p> <p>What would you all suggest?</p> <p>Kind Regards, Clint</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload