Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to properly position my sub-drop down menu?
    primarykey
    data
    text
    <p>I'm creating a 2 tier drop down, menu and sub-menu, and I'm having an issue with either positioning, relative or absolute, and or floats. I've played around with absolute and the space/gap goes away, but my sub-menu's don't fly-out next to the hovered item, only the first. I tried relative and float both produce the undesired gap, but the sub-menu fly's out next to the hovered item as I want. Here's the code where I believe is where the issue is. <strong>Note, I created a JSFIDDLE so you can see the working code example:</strong></p> <p>Here's the <a href="http://jsfiddle.net/rVec3/" rel="nofollow noreferrer">JSFIDDLE</a> that has the HTML and CSS. I put the code that has the gaps, but has the correct fly-out positioning. If I need to clarify things more clearly, let me know and I'll try.</p> <p><strong>Troubled code - I think</strong></p> <pre><code>.sub-navigation-content { position: relative; margin: 0 0 0 150px; top: -10px; width: 180px; background-color: #fff; border: 1px solid #ccc; z-index: 999; visibility: hidden; box-shadow: 0 5px 10px 0 #999; } </code></pre> <p>Below are screen shots of what I want it to look like:</p> <p><strong>Correct looking fly-out, but incorrect fly-out position:</strong></p> <p><img src="https://i.stack.imgur.com/NyP7g.jpg" alt="enter image description here"></p> <p><strong>Incorrect looking fly-out, but correct fly-out position:</strong></p> <p><img src="https://i.stack.imgur.com/0YDOs.jpg" alt="enter image description here"></p> <p>Thanks in advance for having a look :)</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