Note that there are some explanatory texts on larger screens.

plurals
  1. POSub menu of dropdown menu pushing ul li
    text
    copied!<p>here is what's happening.</p> <p>As required!</p> <p><a href="http://jsfiddle.net/U99Br/" rel="nofollow noreferrer">http://jsfiddle.net/U99Br/</a></p> <p><img src="https://i.stack.imgur.com/Q466a.png" alt="http://i.stack.imgur.com/Q466a.png"></p> <p>So I'm making this web site with a drop down menu, until now it was all good, but while doing my drop-down menu (I wanted to do something of the sort of Netflix's menu), I noticed my sub-menu is pushing the "contact" <code>li</code> tag <code>300px</code> away (which is it's length).</p> <p>Here's my code: </p> <pre><code>#menu, #menu ul, #menu li { margin: 0; padding: 0; list-style: none; } #menu a { text-decoration: none; } #menu { height: 60px; width: auto; } #menu &gt; ul &gt; li { float: left; margin-left: 15px; position: relative; } #menu &gt; ul &gt; li &gt; a { color: #fff; text-shadow: 1px 1px 5px #737373; font-size: 20px; line-height: 60px; padding: 15px 20px; } #menu &gt; ul &gt; li &gt; a:hover { color: #000; } #menu &gt; ul &gt; li &gt; ul { opacity: 0; visibility: hidden; display: none; background-color: #fff; text-align: left; height: auto; box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.4); width: 300px; } #menu &gt; ul &gt; li:hover &gt; ul { display: block; border: none; visibility: visible; opacity: 1; } #menu &gt; ul &gt; li &gt; ul &gt; li { display: block; content: ''; } #menu &gt; ul &gt; li &gt; ul &gt; li &gt; a { font-size: 12px; color: #000; display: block; text-shadow: none; } #menu &gt; ul &gt; li &gt; ul &gt; li &gt; a:hover { color: #0AB3FC; } #menu &gt; ul ul &gt; li { position: relative; } </code></pre> <p>I have not found what's wrong in my coding yet! </p>
 

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