Note that there are some explanatory texts on larger screens.

plurals
  1. POVertical Menu with submenus flying out when mouse is hovered
    primarykey
    data
    text
    <p>I am trying to create a vertical menu with fly outs .That is a vertical menu with sub-menus.What is wrong with the following code?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;style type="text/css"&gt; #navmenu ul ul li a { border:1px solid #888888; border-bottom: none; font-size:12pt; line-height: 1.6em; color:#303030; background-color:#a5a5a5; background-image:none; } #navmenu { width: 150px; /* set width of menu */ } #navmenu ul { list-style-type:none; margin:0px; padding:0px; } #navmenu a { text-decoration:none; border: 1px solid #303030; width:170px; display:block; text-align:center; font-size:14pt; line-height:2em; background:url(Button_top.gif) repeat-x left; font-family:Arial, Helvetica, sans-serif; color:white; } #navmenu a:hover { color: #a00; /* red text color on hover */ background: #fff; /* white bgcolor on hover */ } #navmenu li { /* make the list elements a containing block for the nested lists */ position: relative; } #navmenu ul ul { position: absolute; top: 0; left: 100%; /* to position them to the right of their containing block */ width: 100%; /* width is based on the containing block */ } #navmenu li { /* make the list elements a containing block for the nested lists */ position: relative; } #navmenu ul ul { display: none; } #navmenu ul li:hover ul { display:block; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="navmenu"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#"&gt;Home&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Blog&lt;/a&gt; &lt;/li&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#"&gt;Blog 1&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Blog 2&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;li&gt; &lt;a href="#"&gt;Websites&lt;/a&gt; &lt;/li&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#"&gt;Websites 1&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Websites 2&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;li&gt; &lt;a href="#"&gt;Photos&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><a href="http://jsfiddle.net/9bHkj/1/" rel="nofollow">http://jsfiddle.net/9bHkj/1/</a></p>
    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.
    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