Click here to Skip to main content
15,885,933 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
MY HTML CODE Is
HTML
<ul id="menu">
            <li><a href="#">Home</a></li>
            <li><a href="#">About</a>
                <ul>
                    <li><a href="#">History</a></li>
                    <li><a href="#">Mission & Vision</a></li>
                </ul>
            </li>
            <li><a href="#">Project</a>
			<ul>
                    <li><a href="#">Yashodara</a></li>
                    <li><a href="#">SLC</a></li>
					<li><a href="#">CDP</a></li>
                    <li><a href="#">Avocacy</a></li>
              </ul>
			</li>
            <li><a href="#">Collaborate</a>
                <ul>
                    <li><a href="#">Sponsor a Child</a></li>
                    <li><a href="#">Donate</a></li>
                    <li><a href="#">Rupee one</a></li>
                    <li><a href="#">Volunteering</a></li>
                    <li><a href="#">Companies</a></li>
                </ul>
            </li>
            <li><a href="#">Gallery</a>
			<ul>
                    <li><a href="#">Image</a></li>
                    <li><a href="#">Vedio</a></li>
              </ul>
			</li>
			<li><a href="#">Report & Publication</a>
			<ul>
                    <li><a href="#">Anual Report</a></li>
                    <li><a href="#">Audit</a></li>
                    <li><a href="#">Expanses Pattern</a></li>
                    <li><a href="#">Publication</a></li>
              </ul>
			</li>
            <li><a href="#">Contact</a></li>
        </ul>

MY CSS Is
CSS
#menu, #menu ul
{
    margin: 0px;
    padding: 1px;
    list-style: none;
    float: right;
}
#menu
{
    min-width: 460px;
    margin-top: 58px;
    background: #0080C0;
    border-left: 2px solid #0080C0;
	border-top: 2px solid #0080C0;
    border-radius: 10px 0 0 0;
}
#menu:before, #menu:after
{
    content: "";
    display: table;
}

#menu:after
{
    clear: both;
}

#menu
{
    zoom: 1;
}
#menu li
{
    float: left;
    border-right: 1px solid #fff;
    position: relative;
}

#menu a
{
    float: left;
    padding: 12px 30px;
    color: #fff;
    text-transform: uppercase;
    font: bold 12px Arial, Helvetica;
    text-decoration: none;
}

#menu li:hover > a
{
    color: #fff;
    background-color: #4AA5FF;
    border-radius: 0px 0 0 0;
}

*html #menu li a:hover
{
    /* IE6 only */
    color: #ff0000;
}
#menu ul
{
    margin: 20px 0 0 0;
    _margin: 0; /*IE6 only*/
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 1;
    background: #444;
    background: linear-gradient(#444, #111);
    box-shadow: 0 -1px 0 rgba(255,255,255,.3);
    border-radius: 3px;
    transition: all .2s ease-in-out;
}

#menu li:hover > ul
{
    opacity: 1;
    visibility: visible;
    margin: 0;
}

#menu ul ul
{
    top: 0;
    left: 150px;
    margin: 0 0 0 20px;
    _margin: 0; /*IE6 only*/
    box-shadow: -1px 0 0 rgba(255,255,255,.3);
}

#menu ul li
{
    float: none;
    display: block;
    border: 0;
    _line-height: 0; /*IE6 only*/
    box-shadow: 0 1px 0 #111, 0 2px 0 #666;
}

#menu ul li:last-child
{
    box-shadow: none;
}

#menu ul a
{
    padding: 10px;
    width: 130px;
    _height: 10px; /*IE6 only*/
    display: block;
    white-space: nowrap;
    float: none;
    text-transform: none;
}

#menu ul a:hover
{
    background-color: #008ED2;
    
}
#menu ul li:first-child > a
{
    border-radius: 3px 3px 0 0;
}

#menu ul li:first-child > a:after
{
    content: '';
    position: absolute;
    left: 40px;
    top: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #444;
}

#menu ul ul li:first-child a:after
{
    left: -6px;
    top: 50%;
    margin-top: -6px;
    border-left: 0;
    border-bottom: 6px solid transparent;
    border-top: 6px solid transparent;
    border-right: 6px solid #3b3b3b;
}

/*#menu ul li:first-child a:hover:after
{
    border-bottom-color: #000;
}*/

#menu ul ul li:first-child a:hover:after
{
    border-right-color: #0299d3;
    border-bottom-color: transparent;
}

#menu ul li:last-child > a
{
    border-radius: 0 0 3px 3px;
}
* html #menu             { zoom: 1; } /* IE6 */
*:first-child+html #menu { zoom: 1; } /* IE7 */


I have also add the following script in head section
JavaScript
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
        $(function () {
            if ($.browser.msie && $.browser.version.substr(0, 1) < 7) {
                $('li').has('ul').mouseover(function () {
                    $(this).children('ul').css('visibility', 'visible');
                }).mouseout(function () {
                    $(this).children('ul').css('visibility', 'hidden');
                })
            }
        }); 
    </script>
Posted
Comments
PIEBALDconsult 17-Jun-14 15:18pm    
I'm no web developer, but it doesn't that you provide enough information to explain "is not working".

1 solution

The following script in the header is missed

<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>


As it's described in the following link that it wont work in jQuery 1.9 or later unless the jQuery Migrate plugin is included :

http://api.jquery.com/jQuery.browser/[^]
 
Share this answer
 
Comments
Member 10006836 19-Jun-14 14:49pm    
No it stil not working in IE

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900