[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

sub list behind menu

Posted on 2013-06-02
1
Medium Priority
?
445 Views
Last Modified: 2013-06-03
Hi,

My sub menu doesnt display properly as it appears partly above and behind the the current link I am hovering on.

How do I fix this?
*{
    margin:0;
    padding:0;
	 list-style-type: none; 
}

/* FOR ANYTHING GREATER THAN MOBILE RESOLUTION */
@media screen and (min-width: 480px) {
  
   
    #nav-status {
        display: none;    
    }

    ul#mynav {
        width: 100%;    
        min-height: 25px;
        color:#fff;
        background:#CCC;
        overflow: visible;
    }

    ul#mynav li {
        color:#000;
        border-right: 1px solid #333;
        
        height: 21px;
        padding:2px;
        position: relative; 
		list-style-type: none;  
    }

    ul#mynav li:last-child {
        border-right: none;
    }

  

    ul#mynav li:hover ul {
        display: block;    
    }
	
	ul#mynav a {
		display:block;
		width: 100%;
		  color:#fff;
        background:#666;
       
	}
	
	  ul#mynav li ul {
       
	    display: none;
        
        color:#fff;
        background:#666;
        position: absolute; 
        top: 0px; 
        left: 50px;
        overflow: hidden;
    }
    .more{
        display:none;
    }
}


<ul id="mynav">
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Item 3</a></li>
    <li><a href="#">Item 4</a></li>
    <li>
        <a href="#">Item 5 <span class="more">></span></a>
        <ul>
            <li><a href="#">Sub Item 1</a></li>
            <li><a href="#">Sub Item 2</a></li>
            <li><a href="#">Sub Item 3</a></li>
        </ul>
    </li>
    <li><a href="#">Item 6</a></li>
    <li><a href="#">Item 7</a></li>
</ul>
</div>

Open in new window

0
Comment
Question by:jagguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 2000 total points
ID: 39215361
Change your style sheet to:

*{
    margin:0;
    padding:0;
	 list-style-type: none; 
}

/* FOR ANYTHING GREATER THAN MOBILE RESOLUTION */
@media screen and (min-width: 480px) {
  
   
    #nav-status {
        display: none;    
    }

    ul#mynav {
        width: 100%;    
        min-height: 25px;
        color:#fff;
        background:#CCC;
        overflow: visible;
    }

    ul#mynav li {
        color:#000;
        border-right: 1px solid #333;
        height: 21px;
        padding:2px;
		list-style-type: none;  
    }

    ul#mynav li:last-child {
        border-right: none;
    }

  

    ul#mynav li:hover ul {
        display: block;    
    }
	
	ul#mynav a {
		display:block;
		width: 100%;
		  color:#fff;
        background:#666;
       
	}
	
	  ul#mynav li ul {
       
	    display: none;
        
        color:#fff;
        background:#666;
        position: absolute; 
        left: 50px;
        overflow: hidden;
    }
    .more{
        display:none;
    }
}

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question