Note that there are some explanatory texts on larger screens.

plurals
  1. POIE Drop Down Menu Retreating Beyond First Item
    primarykey
    data
    text
    <p>I have a purely CSS driven menu that is having some IE problems. In IE 8 and 9, the drop down retreats if you mouse beyond the first item. In 7 it's hidden behind other elements. (don't care as much about 7 but thought I'd put it out there as well). </p> <p><strong>Markup follows this basic structure.</strong></p> <pre><code>&lt;nav&gt; &lt;ul&gt; &lt;li&gt;&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>/* Main Navigation */ nav#main-nav &gt; .menu { margin: 0; line-height: 100%; padding: .4em 0; overflow: visible; position: relative; background: transparent url(../images/bg-element-gradient.png) repeat-x top left; /* Old browsers */ background: -moz-linear-gradient(top, rgba(219,227,236,1) 10%, rgba(255,255,255,1) 50%, rgba(219,227,236,1) 90%); background: -webkit-gradient(linear, left top, left bottom, color-stop(10%,rgba(219,227,236,1)), color-stop(50%,rgba(255,255,255,1)), color-stop(90%,rgba(219,227,236,1))); background: -webkit-linear-gradient(top, rgba(219,227,236,1) 10%,rgba(255,255,255,1) 50%,rgba(219,227,236,1) 90%); background: -o-linear-gradient(top, rgba(219,227,236,1) 10%,rgba(255,255,255,1) 50%,rgba(219,227,236,1) 90%); background: -ms-linear-gradient(top, rgba(219,227,236,1) 10%,rgba(255,255,255,1) 50%,rgba(219,227,236,1) 90%); } nav#main-nav &gt; .menu &gt; li { padding: 0 1.9%; line-height: 1.5em; float: left; position: relative; list-style: none; } nav#main-nav &gt; .menu &gt; li:not(:last-child) { border-right: 1px solid #d1d1d1; } nav#main-nav &gt; .menu &gt; li.last { margin-right: 0; } /* dropdown */ nav#main-nav &gt; .menu li.expanded:hover &gt; ul { visibility: visible; opacity: 100; -webkit-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -moz-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -ms-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -o-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); /* ease (default) */ } /* Main-Nav: Level 2 */ nav#main-nav &gt; .menu &gt; li.expanded &gt; ul { z-index: 100; list-style: none; display: block; margin: 0; padding: 0; width: 155px; position: absolute; top: 1.6em; left: 0; visibility: hidden; opacity: 0; min-width: 100%; border-left: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1; font-size: .8em; line-height: 1em; -webkit-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -moz-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -ms-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); -o-transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); transition: all 500ms cubic-bezier(0.250, 0.100, 0.250, 1.000); /* ease (default) */ -webkit-border-bottom-right-radius: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -moz-border-radius-bottomleft: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; background: -moz-linear-gradient(top, rgba(255,255,255,0.95) 0%, rgba(219,227,236,0.95) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.95)), color-stop(100%,rgba(219,227,236,0.9))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(255,255,255,0.95) 0%,rgba(219,227,236,0.95) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(255,255,255,0.95) 0%,rgba(219,227,236,0.95) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(255,255,255,0.95) 0%,rgba(219,227,236,0.95) 100%); /* IE10+ */ background: linear-gradient(top, rgba(255,255,255,0.95) 0%,rgba(219,227,236,0.95) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6ffffff', endColorstr='#e6dbe3ec',GradientType=0 ); /* IE6-9 */ } nav#main-nav &gt; .menu ul li { float: none; margin: 0; padding: 0; } nav#main-nav &gt; .menu &gt; li.expanded &gt; ul &gt; li { display: block; padding: 0 0 1em 1.1em; z-index: 101; } nav#main-nav &gt;.menu &gt; li.expanded &gt; ul &gt; li:first-child { padding-top: 1em; } nav#main-nav &gt; .menu &gt; li.expanded &gt; ul &gt; li &gt; a { width: 100%; display: block; padding: 0 1.1em .25em .25em; } nav#main-nav &gt; .menu &gt; li:last-child &gt; ul { position: absolute; left: -75px; } nav#main-nav &gt; .menu:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } html[xmlns] .menu { display: block; } * html .menu { height: 1%; } </code></pre> <p>To see it live, visit recognia.com.</p>
    singulars
    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.
    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