Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>I think you are trying to create a navigational bar</strong> as inferred from the information you've posted as well as your general question.</p> <p><strong>To implement this fully would require a bit of editing and explanation</strong> - which will be too long to do fully. So, I adapted a nice solution off the web that uses <strong>unordered lists, and CSS</strong> and have made it available to you as well as the article from where it is linked.</p> <p>Solution Attempt: <a href="http://jsfiddle.net/zFsaF/1/" rel="nofollow">http://jsfiddle.net/zFsaF/1/</a></p> <pre><code>&lt;nav&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Staff&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="faculty.html"&gt;Faculty&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="fellows.html"&gt;Fellows&lt;/a&gt;&lt;li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Locations&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="PCAM.html"&gt;Perelman Center for Advanced Medicine&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="PPMC.html"&gt;Presbyterian Medical Center&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="Randor.html"&gt;Penn Medicine at Randor&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Patient Resources&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="Preps.html"&gt;Procedure Preps&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ProviderNumbers.html"&gt;Insurance Provider Numbers&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="Lichtensteindiet.html"&gt;IBD Diet&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; </code></pre> <p>CSS:</p> <pre><code>nav ul ul { display: none; } nav ul li:hover &gt; ul { display: block; } nav ul { background: #efefef; background: linear-gradient(top, #efefef 0%, #bbbbbb 100%); background: -moz-linear-gradient(top, #efefef 0%, #bbbbbb 100%); background: -webkit-linear-gradient(top, #efefef 0%,#bbbbbb 100%); box-shadow: 0px 0px 9px rgba(0,0,0,0.15); padding: 0 20px; border-radius: 10px; list-style: none; position: relative; display: inline-table; } nav ul:after { content: ""; clear: both; display: block; } nav ul li { float: left; } nav ul li:hover { background: #4b545f; background: linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%); } nav ul li:hover a { color: #fff; } nav ul li a { display: block; padding: 25px 40px; color: #757575; text-decoration: none; } nav ul ul { background: #5f6975; border-radius: 0px; padding: 0; position: absolute; top: 100%; } nav ul ul li { float: none; border-top: 1px solid #6b727c; border-bottom: 1px solid #575f6a; position: relative; } nav ul ul li a { padding: 15px 40px; color: #fff; } nav ul ul li a:hover { background: #4b545f; } nav ul ul ul { position: absolute; left: 100%; top:0; } </code></pre> <p>Article: <a href="http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu" rel="nofollow">http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu</a></p> <p>You can of course adapt this as you need it however you wish.</p> <p><strong>NOTE: If some things do not make sense, you can always refer back to the original article, use Google, or consult the very good W3Schools reference:</strong></p> <p><a href="http://www.w3schools.com/css/css_navbar.asp" rel="nofollow">http://www.w3schools.com/css/css_navbar.asp</a></p> <p>Good luck!</p> <p>UPDATE:</p> <p>The OP forgot to mention that the <strong>solution has to be in Javascript</strong>. </p> <p><strong>As such, the best place to begin would be to examine tutorials that have already done what is requested.</strong> Here's an excellent place to start:</p> <p><a href="http://vandelaydesign.com/blog/tools/dropdown-navigation-menus/" rel="nofollow">http://vandelaydesign.com/blog/tools/dropdown-navigation-menus/</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.
    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