Note that there are some explanatory texts on larger screens.

plurals
  1. POHorizontal dropdown navigation pure css
    primarykey
    data
    text
    <p>I am working on a site with a horizontal dropdown navigation but it's not working as it should.</p> <p>I can't get the second level navigation to hide until the first is hovered on. I get that I need the direct descendant. Also when the current page is on the nav needs to show but I just cannot work it out!</p> <p>The css I have in there at the moment is below. I can't tell you how much I would appreciate any help.</p> <p>The site is: <a href="http://www.lifetimetraining.co.uk/" rel="nofollow">http://www.lifetimetraining.co.uk/</a></p> <pre><code>#navSection{ background:#fff url(../images/topNavBg.png) repeat-x scroll 0 0; clear:both; color:#fff; height:87px; position:relative; width:1000px </code></pre> <p>}</p> <pre><code>#navSection a{ color:#fff </code></pre> <p>}</p> <pre><code>#primaryNav li{ border-right:1px solid #6a8db3; float:left; font-size:.83em; font-weight:bold; height:56px; line-height:1.1em; width:169px </code></pre> <p>}</p> <pre><code>#primaryNav li a{ display:block; height:36px; padding:10px 0 10px 20px; text-decoration:none; width:150px </code></pre> <p>}</p> <pre><code>#primaryNav li strong{ display:block; font-size:1.5em; line-height:1.06em </code></pre> <p>}</p> <pre><code>#primaryNav li ul.secondLevel{ clear:both; border-radius:0 0 14px 14px; -moz-border-radius:0 0 14px 14px; -webkit-border-radius:0 0 14px 14px; height:31px; left:-99999px; line-height:31px; padding:0; position:absolute; top:56px; width:1000px </code></pre> <p>}</p> <pre><code>#primaryNav li ul.secondLevel li{ position:relative; width:auto </code></pre> <p>}</p> <pre><code>#primaryNav li li.first a{ border-radius:0 0 0 14px; -moz-border-radius:0 0 0 14px; -webkit-border-radius:0 0 0 14px; padding-left:20px </code></pre> <p>}</p> <pre><code>#primaryNav li.current ul{ left:0; z-index:3 </code></pre> <p>}</p> <pre><code>#primaryNav ul li{ border:none; font-size:1.2em; height:31px; width:auto </code></pre> <p>}</p> <pre><code>#primaryNav li ul a{ display:block; float:left; font-size:.9em; font-weight:bold; height:31px; line-height:31px; padding:0 10px; text-decoration:none; width:auto </code></pre> <p>}</p> <pre><code>#primaryNav li.firstLevel.current&gt;a,#primaryNav li.firstLevel:hover&gt;a{ background:#00a3a8 url('../images/colour3Gradient.png') repeat-x scroll 0 0 </code></pre> <p>}</p> <pre><code>#primaryNav li.current ul,#primaryNav li.current ul li a{ background-color:#00a3a8 </code></pre> <p>}</p> <pre><code>#primaryNav li.current li:hover a,#primaryNav li.current li.current a{ background-color:#00b7bc </code></pre> <p>}</p> <pre><code>#primaryNav li.firstLevel ul li ul.thirdLevel, #primaryNav li.firstLevel ul li ul.thirdLevel li, #primaryNav li.firstLevel ul li ul.thirdLevel li a{ border-radius:none </code></pre> <p>}</p> <pre><code>#primaryNav li.firstLevel ul li ul.thirdLevel{ min-width:210px; display:block; position:absolute; top:31px; left:0; visibility:hidden; background-color:#51c5c3; border-radius:0 0 10px 10px; -webkit-border-radius:0 0 10px 10px; -moz-border-radius:0 0 10px 10px </code></pre> <p>}</p> <pre><code>#primaryNav li.firstLevel ul li ul.thirdLevel li{ font-size:1em; display:block; width:auto; float:left; clear:left; height:auto </code></pre> <p>}</p> <pre><code>#primaryNav li.firstLevel ul li ul.thirdLevel li a{ background:none; height:auto; display:block; padding:6px 0 6px 20px; line-height:16px </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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