Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Menu in .NET

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 34
    Comment on it

    While designing webpage there are scenarios when you want to create menu for navigating different pages from a single page.

     

    Sometimes you have situations when you want to build these menus horizontally and sometimes vertically

     

    For doing that you use ol Oredered List and ul Unordered List :

     

    Example:

     

     <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js" type="text/javascript"></script>
    
    
     <style>
    #jsddm
    {    margin: 0;
        padding: 0}
    
        #jsddm li
        {   float: left;
            list-style: none;
            font: 12px Tahoma, Arial}
    
        #jsddm li a
        {   display: block;
            background: #20548E;
            padding: 5px 12px;
            text-decoration: none;
            border-right: 1px solid white;
            width: 70px;
            color: #EAFFED;
            white-space: nowrap}
    
        #jsddm li a:hover
        {   background: #1A4473}
    
            #jsddm li ul
            {   margin: 0;
                padding: 0;
                position: absolute;
                visibility: hidden;
                border-top: 1px solid white}
    
            #jsddm li ul li
            {   float: none;
                display: inline}
    
            #jsddm li ul li a
            {   width: auto;
                background: #9F1B1B}
    
            #jsddm li ul li a:hover
            {   background: #7F1616}
    
     </style>
    
        <script>
    
            var timeout = 500;
            var closetimer = 0;
            var ddmenuitem = 0;
    
            function jsddmopen() {
                jsddmcanceltimer();
                jsddmclose();
                ddmenuitem = $(this).find('ul').css('visibility', 'visible');
            }
    
            function jsddmclose()
            { if (ddmenuitem) ddmenuitem.css('visibility', 'hidden'); }
    
            function jsddmtimer()
            { closetimer = window.setTimeout(jsddmclose, timeout); }
    
            function jsddmcanceltimer() {
                if (closetimer) {
                    window.clearTimeout(closetimer);
                    closetimer = null;
                }
            }
    
            $(document).ready(function () {
                $('#jsddm > li').bind('mouseover', jsddm&open)
                $('#jsddm > li').bind('mouseout', jsddm&timer)
            });
    
            document.onclick = jsddmclose;
    
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
      <ul id="jsddm">
        <li><a href="#">JavaScript</a>
            <ul>
                <li><a href="#">Drop Down Menu</a></li>
                <li><a href="#">jQuery Plugin</a></li>
                <li><a href="#">Ajax Navigation</a></li>
            </ul>
        </li>
        <li><a href="#">Effect</a>
            <ul>
                <li><a href="#">Slide Effect</a></li>
                <li><a href="#">Fade Effect</a></li>
                <li><a href="#">Opacity Mode</a></li>
                <li><a href="#">Drop Shadow</a></li>
                <li><a href="#">Semitransparent</a></li>
            </ul>
        </li>
        <li><a href="#">Navigation</a></li>
        <li><a href="#">HTML/CSS</a></li>
        <li><a href="#">Help</a></li>
    </ul>
        </form>
    </body>
    </html>
    
    .net

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: