Untuk membuat menu drop down seperti di blog saya, saya menggunakan kode HTML dan kode CSS agar tampilan drop down menunya menjadi menarik. Untuk membuatnya drop down seperti ini silahkan ikuti langkah-langkah dibawah ini (khusus untuk template minima yang baru) :
1. Copy paste kode HTML di samping pada HTML/Javascript gadget. Simpan kode yang telah dibuat.
/* ================================================================
This copyright notice must be kept untouched in the stylesheet at all times. The original
version of this stylesheet and the associated (x)html is available at
http://www.cssplay.co.uk/menus/anywidth2.html
Copyright (c) 2005-2009 Stu Nicholls. All rights reserved. This stylesheet and the associated
(x)html may be modified in any way to fit your requirements.
=================================================================== */
#menu {width:1000px; background: #3aa3d3; height:20px;; text-align:left; position:relative;
z-index:500;}
#menu ul {margin:0; padding:0; list-style:none; white-space:nowrap; text-align:left;}
#menu ul {display:inline-block;}
#menu li {margin:0; padding:0; list-style:none;}
#menu li {display:inline-block; display:inline;}
#menu ul ul {position:absolute; left:-9999px;}
#menu ul.level1 {margin:0 auto; background:#710;}
#menu ul.level1 li.level1-li {float:left; display:block; position:relative;}
#menu ul.level1 {background:#3aa3d3;}
#menu ul.level2 {background:#ae4621;}
#menu ul.level3 {background:#c98b14;}
#menu ul.level4 {background:#9f690e;}
#menu b {position:absolute;} /* -- for IE6 non-flyout dropdowns to stop flickering - who knows
why --*/
#menu a {display:block; font:normal 11px verdana,arial,sans-serif; color:#fff;
line-height:25px; text-decoration:none;padding:0 20px 0 10px;}
#menu ul.level1 li.level1-li a.level1-a {float:left;}
#menu ul li:hover > ul {visibility:visible; left:0; top:25px;}
#menu ul ul li:hover > ul {visibility:visible; left:100%; top:auto; margin-top:-25px;}
#menu li.left:hover > ul {visibility:visible; left:auto; right:0; top:25px;}
#menu li.left ul li:hover > ul {visibility:visible; left:auto; right:100%; top:auto;
margin-top:-25px;}
#menu a:hover ul {left:0; top:23px;}
#menu li.left a:hover ul {left:auto; right:-1px; top:23px;}
#menu li.left ul a {text-align:right; padding:0 10px 0 20px;}
#menu a:hover a:hover ul,
#menu a:hover a:hover a:hover ul {left:100%; visibility:visible;}
#menu li.left a:hover a:hover ul,
#menu li.left a:hover a:hover a:hover ul {left:auto; right:0; visibility:visible;}
#menu a:hover ul ul,
#menu a:hover a:hover ul ul {left:-9999px;}
#menu li.left a:hover ul ul,
#menu li.left a:hover a:hover ul ul {left:-9999px;}
#menu li a.fly {font-variant: small-caps;}
#menu li.left ul a.fly {font-variant: small-caps;}
#menu li a:hover,
#menu li a.fly:hover {background-color:#555555;}
#menu li:hover > a,
#menu ul li:hover > a.fly {background-color:#555555;}
#menu table {position:absolute; height:0; width:0; left:0; border-collapse:collapse;
margin-top:-4px;}
#menu table table {position:absolute; left:99%; height:0; width:0; border-collapse:collapse;
margin-top:-29px;}
#menu li.left table {position:absolute; height:0; width:0; left:auto; right:0;
border-collapse:collapse; margin-top:-4px;}
#menu li.left table table {position:absolute; left:auto; right:100%; height:0; width:0;
border-collapse:collapse; margin-top:-29px;}
2.Langkah selanjutnya copy dan paste kode CSS di samping sebelum
]]></b:skin> di kode template.
Tidak ada komentar:
Posting Komentar