Jumat, 11 Januari 2013

cara membuat multilevel menu drop down di blog

Selamat sore sobat kali ini saya akan berbagi cara membuat menu navigasi horizontal Multi level Drop down, guna mempermudah dalam mengexplorasi blog sobat, adapun langkah-langkahnya sebagai berikut;

  1. Login ke Blogger dengan akun   
  2. Kemudian pada dasbor klik Tata Letak >> Edit HTML centang expand template widget
  3. Jangan lupa untuk download template anda, berjaga-jaga jika nanti ada kesalahan.
  4. Letakkan script JQuery berikut sebelum tag </head>
     
    <script  type="text/javascript" 
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js">
    </script>
     
  5. Catatan : bagi anda yang sudah pernah menambahkan atau pada templatenya sudah terdapat scrip Jquery maka langkah ini abaikan saja
  6. Tambahkan juga script berikut setelah script JQuery yadi
     
    <link rel="stylesheet" type="text/css"  href="jqueryslidemenu.css" />
     <!--[if lte IE 7]>         
    <style type="text/css">
    html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/
    </style>
    <![endif]-->
    <script type="text/javascript" 
    src="https://sites.google.com/site/bangkolis/javascript/maskolis.js">
    </script>
     
  7. Selanjutnya tambahkan kode CSS berikut diatas tag  ]]></b:skin>
    .jqueryslidemenu{
    font: bold 12px Verdana;
    background: #414141;
    width: 100%;
    }

    .jqueryslidemenu ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }

    /*Top level list items*/
    .jqueryslidemenu ul li{
    position: relative;
    display: inline;
    float: left;
    }

    /*Top level menu link items style*/
    .jqueryslidemenu ul li a{
    display: block;
    background: #414141; /*background of tabs (default state)*/
    color: white;
    padding: 8px 10px;
    border-right: 1px solid #778;
    color: #2d2b2b;
    text-decoration: none;
    }

    * html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
    display: inline-block;
    }

    .jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{
    color: white;
    }

    .jqueryslidemenu ul li a:hover{
    background: black; /*tab link background during hover state*/
    color: white;
    }

    /*1st sub level menu*/
    .jqueryslidemenu ul li ul{
    position: absolute;
    left: 0;
    display: block;
    visibility: hidden;
    }

    /*Sub level menu list items (undo style from Top level List Items)*/
    .jqueryslidemenu ul li ul li{
    display: list-item;
    float: none;
    }

    /*All subsequent sub menu levels vertical offset after 1st level sub menu */
    .jqueryslidemenu ul li ul li ul{
    top: 0;
    }

    /* Sub level menu links style */
    .jqueryslidemenu ul li ul li a{
    font: normal 13px Verdana;
    width: 160px; /*width of sub menus*/
    padding: 5px;
    margin: 0;
    border-top-width: 0;
    border-bottom: 1px solid gray;
    }

    .jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/
    background: #eff9ff;
    color: black;
    }

    /* CSS classes applied to down and right arrow images  */

    .downarrowclass{
    position: absolute;
    top: 12px;
    right: 7px;
    }

    .rightarrowclass{
    position: absolute;
    top: 6px;
    right: 5px;
    }
  8. Setelah itu tambahkan kode HTML berikut diatas <div id='header-wrapper'> (menu drop down diatas header), jika ingin meletakkan di bawah header cari kode penutup header seperti ini       </div><!-- end header-wrapper --> kemudian letakkan dibawahnya :
    <div id="myslidemenu" class="jqueryslidemenu">
    <ul>
    <li><a href="http://antoncabon4u.blogspot.com/">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Folder 1</a>
      <ul>
      <li><a href="#">Sub Item 1.1</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      </ul>
    </li>
    <li><a href="#">Item 3</a></li>
    <li><a href="#">Folder 2</a>
      <ul>
      <li><a href="#">Sub Item 2.1</a></li>
      <li><a href="#">Folder 2.1</a>
        <ul>
        <li><a href="#">Sub Item 2.1.1</a></li>
        <li><a href="#">Sub Item 2.1.2</a></li>
        <li><a href="#">Folder 3.1.1</a>
            <ul>
                <li><a href="#">Sub Item 3.1.1.1</a></li>
                <li><a href="#">Sub Item 3.1.1.2</a></li>
                <li><a href="#">Sub Item 3.1.1.3</a></li>
                <li><a href="#">Sub Item 3.1.1.4</a></li>
                <li><a href="#">Sub Item 3.1.1.5</a></li>
            </ul>
        </li>
        <li><a href="#">Sub Item 2.1.4</a></li>
        </ul>
      </li>
      </ul>
    </li>
    <li><a href="http://antoncabon4u.blogspot.com/">Item 4</a></li>
    </ul>
    <br style="clear: left" />
    </div>
  9. Terakhir Save Template anda, dan lihat hasilnya.
Silahkan ganti kode yang saya beri warna dengan tulisan anda sendiri, itu dulu tutorial kali ini selamat mencoba.

Sumber: DISINI

"Watch your thoughts; they become words. Watch your words; they become actions. Watch your actions; they become habits. Watch your habits; they become character. Watch your character; it becomes your destiny." LaoTzu
Share this article

0 komentar:

Posting Komentar

 
Copyright © 2014 Clickme More • All Rights Reserved.
Clickme More | Template Design by BTDesigner • Powered by Blogger
back to top