Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange problem: CSS-based menu behaves differently in IE "compatibility" mode
    primarykey
    data
    text
    <p>Update:</p> <p>I've added a bounty to this. To claim it, I need a version of the code below that does NOT exhibit the symptoms I describe. </p> <p>Here's a simple test case. In Chrome, Firefox, and IE8 with compatibility mode off, this works as expected. However, turn on compatibility mode (toggle Tolls->Compatibility View) there's a glitch with the way some of the menu block show &amp; hide.</p> <p>To see the issue:</p> <p>Save the example to a file, and view it via web browser (note that if you simply load it from a file, you can't turn on compatibility view - it has to be delivered from a web server).</p> <p>Move the mouse from "Here" to "There" to "Everywhere", then down so that "No" is highlighted, and the 3rd level menu is displayed. Move the mouse out to the <strong>left</strong>. Only the top menu is displayed.</p> <p>Now repeat the steps. When you hit "Everywhere" the 2nd time, the 3rd level menu block is shows, but with nothing in it.</p> <p>Is there any way to prevent this from happening, even in Compatibility View?</p> <p>Sample:</p> <hr> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;test&lt;/title&gt; &lt;style&gt; #navRaw, #navRaw ul{ margin: 0; padding: 0; list-style-type: none; list-style-position: outside; position: relative; line-height: 26px; } #navRaw a{ display: block; padding: 0px 5px; color: #000; text-decoration: none; background-color: silver; line-height: 28px !important; } #navRaw a:hover{ background-color: #ccc; color: #fff; } #navRaw li{ float: left; position: relative; } #navRaw ul{ position: absolute; display: none; top: 28px; } #navRaw li ul a{ width: 220px; height: auto; float: left; } #navRaw ul ul{top: auto;} #navRaw li ul ul{ left: 230px; margin: 0px 0 0 0px; } #navRaw li:hover ul ul, #navRaw li:hover ul ul ul, #navRaw li:hover ul ul ul ul{ display: none;} #navRaw li:hover ul, #navRaw li li:hover ul, #navRaw li li li:hover ul, #navRaw li li li li:hover ul{ display: block; border: 1px solid Black; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;ul id="navRaw"&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;Here&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;There&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;Everywhere&lt;/b&gt;&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;Yes&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="showsub"&gt;&lt;a href="#"&gt;&lt;b&gt;No&lt;/b&gt;&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;Why&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;Why not&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="menusep"&gt;&lt;a href="#"&gt;&lt;b&gt;Perhaps&lt;/b&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    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