Nitesh is back to blogging.. Apologies for no updates since last 2 months..
TopBottom
Showing posts with label Menu. Show all posts
Showing posts with label Menu. Show all posts

WH Multi level drop down menu v 1.1

Posted by Nitesh Kothari on 15 December 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Two days back, I wrote a quick tutorial on multi level drop down menu on a readers request, but the previous version had some bug. It was not working with IE browser. I recieved 3 more mails, requesting me to write a tutorial for multi level drop down menu that works on all browsers.

WH Multi level drop down menu v 1.1 features:

1. Browser support: FF1+ IE6+ Opera8+
2. Smooth Navigation using jQuery
3. slide plus fade in effect for sub menus
4. Shadow effect

This menu is a css list based menu using jQuery which makes it smoother. The submenus repositions themselves if they are too close to the right or left edge of the page. Shadow effect's color or depth can be changed or completely removed too.


Step 1: CSS Code
Copy and paste the following code just above </b:skin>

.ddsmoothmenu{
font: bold 12px Verdana;
background: #72a8d2 url(http://img291.imageshack.us/img291/4531/navbgbluekp4.png); /*background of menu bar (default state)*/
width: 100%; }

.ddsmoothmenu ul{z-index:100; margin: 0; padding: 0; list-style-type: none;}

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

/*Top level menu link items style*/
.ddsmoothmenu ul li a{display: block; color: white; padding: 4px 10px; border-right: 0px solid #778; color: #2d2b2b; text-decoration: none; font: 14px Georgia; font-weight:bold;}

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

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

.ddsmoothmenu ul li a:hover{background: #dee5e5; /*background of menu items during onmouseover (hover state)*/
color: #2299ff;}

/*1st sub level menu*/
.ddsmoothmenu ul li ul{position: absolute;left: 0; background: #414141;
display: none; /*collapse all sub menus to begin with*/
visibility: hidden;}

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

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

/* Sub level menu links style */
.ddsmoothmenu 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;}

/* ######### CSS classes applied to down and right arrow images ######### */
.downarrowclass{ position: absolute; top: 12px; right: 7px;}

.rightarrowclass{position: absolute; top: 6px; right: 5px;}

/* ######### CSS for shadow added to sub menus ######### */
.ddshadow{position: absolute; left: 0; top: 0; width: 0; height: 0; background: silver;}

.toplevelshadow{ /*shadow opacity. Doesn't work in IE*/
opacity: 0.8;}


Step 2: Copy and paste the following code just above </head>

<!--[if lte IE 7]>
<style type="text/css">
html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js' type='text/javascript'/>
<script src='http://ads.googlecode.com/files/wh%20ddmenu.js' type='text/javascript'/>

The Above code contains some external files, which can be uploaded to your server or on other servers like google code.

Step 1: HTML Code
Add the following code to body section where you wish the menu to appear.

<div id="smoothmenu1" class="ddsmoothmenu">
<ul>
<li><a href="http://clwolvi.blogspot.com">Home</a></li>
<li><a href="#">page 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>
<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="#">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>
<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://clwolvi.blogspot.com/2008/12/multi-level-drop-down-menu-for-blogger.html">Item 4</a></li>
</ul>
<br style="clear: left" />
</div>

Final Words
I think this is the first tutorial on blogosphere about multi level drop down menu for bloggers that works with all browsers. Take a moment to save this post on social bookmarking websites or subscribe via email for more updates. leave a comment here and let me know what do you think about this post.

Multi level drop down menu for blogger

Posted by Nitesh Kothari on 12 December 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

A good site navigation is very important. Every visitor or reader searches for the navigation to read more and more on the blog. I have visited many sites which do not have a site navigation at all. It becomes really difficult to search something on such blogs. I believe, one should have a multi level drop down menu, which gives better accessibility of the content to the readers. Using such menu, it becomes very easy to check almost all blog posts of a blog. Taylor Thompson, owner of Video blogging tips mailed me and asked how to design a drop down menu for the website or blog, so i decided to write a tutorial about it.


Step 1: CSS Code
Copy and paste following code just above </b:skin>

#NavbarMenu {background: #72a8d2;width: 100%;height: 25px;font-size: 12px;font-family: Arial, Tahoma, Verdana;color: #FFF;font-weight: bold;padding: 0;vertical-align:middle;margin-bottom:5px;}

#nav {margin: 0;padding: 0;vertical-align:middle;}
#nav ul {float: left;list-style: none;margin: 0;padding: 0;}
#nav li {list-style: none;margin: 0;padding: 0;}
.current_page_item {background:#dee5e5;color:#2299ff;border-bottom:1px solid #dee5e5;}

#nav li a, #nav li a:link, #nav li a:visited {color: #FFF;display: block;font-size: 15px; font-family: Georgia, Times New Roman;font-weight: normal;text-transform: none;margin: 0; padding: 3px 15px 3px;text-decoration: none; }

#nav li a:hover {background: #dee5e5;color: #2299ff;margin: 0;padding: auto 15px auto; text-decoration: none;vertical-align:middle;border-bottom:1px solid #dee5e5;}

#nav li a:active {background: #dee5e5; color: #2299ff;margin: 0;padding:auto 15px auto; text-decoration: none;border-bottom:1px solid #dee5e5;}

#nav li li a, #nav li li a:link, #nav li li a:visited {background:#555; width: 150px; color: #FFF; font-size: 14px; font-family: Georgia, Times New Roman; font-weight: normal; text-transform: none; float: none; margin: 0; padding: 7px 10px; border-bottom: 1px solid #FFF; border-left: 1px solid #FFF; border-right: 1px solid #FFF;}

#nav li li a:hover, #nav li li a:active {background: #777; color: #FFF; padding: 7px 10px; }

#nav li {float: left; padding: 0;}
#nav li ul {z-index: 9999; position: absolute; left: -999em; height: auto; width: 170px; margin: 0;padding: 0;}

#nav li ul a {width: 140px;}
#nav li ul ul { margin: -32px 0 0 171px;}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {left: -999em;}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {left: auto;}
#nav li:hover, #nav li.sfhover {position: static;}

Step:2 HTML Code
Copy and paste following code to body section(wherever you want to place this dropdown menu).

<div id='NavbarMenu'>
<ul id='nav'>
<li><a expr:href='data:blog.homepageUrl'>Home</a></li>
<li>
<a href='#'>Blogger Hacks</a>
<ul>
<li>
<a href='#'>Most Popular</a>
<ul>
<li><a href='#'>Sub Sub Page #1</a></li>
<li><a href='#'>Sub Sub Page #2</a></li>
<li><a href='#'>Sub Sub Page #3</a></li>
</ul>
</li>
<li><a href='#'>Most Recent</a></li>
<li><a href='#'>Most Commented</a></li>
<li><a href='#'>Top Rated</a></li>
<li><a href='#'>All Blogger Hacks</a></li>
</ul>
</li>
<li><a href='#'>Blogger Widget</a>
<ul>
<li>
<a href='#'>Most Popular</a>
<ul>
<li><a href='#'>Sub Sub Page #1</a></li>
<li><a href='#'>Sub Sub Page #2</a></li>
<li><a href='#'>Sub Sub Page #3</a></li>
</ul>
</li>
<li><a href='#'>Most Recent</a></li>
<li><a href='#'>Most Commented</a></li>
<li><a href='#'>Top Rated</a></li>
<li><a href='#'>All Blogger Hacks</a></li>
</ul>
</li>
<li><a href='#'>Blogger Templates</a></li>
<li><a href='#'>Tag Cloud</a></li>
<li><a href='javascript:togglediv("headlines")'>Headlines</a></li>
</ul>
</div>

Final Words
I am not explaining this hack in detail, because i will be writing a detailed post about multi level drop down menu which works in all the browsers. This menu does not work well with IE. submenus don't appear on mousehover. Expect a better version soon. Leave a comment here, if you have any doubts or queries.

WH Fixed menu for blogger

Posted by Nitesh Kothari on 02 September 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

I am using a fixed menu at left side of my other Blog Free Downloadz since a long time. Today i came across a same menu at Blogfixes.com. So, i thought i should write about it and explain how to customize. Some of the features of Fixed Menu.

  • It is a Fixed menu.
  • It can be placed anywhere on the blog
  • It can be placed horizontally as well as vertically
  • It has Mouse Hover Effect
Demo: Top of this blog or Free Downloadz

How to add WH Fixed Menu for bloggers

a) CSS Code: Copy and paste the following code between <head> and </head>. Most advisable place would be just before ]]></b:skin> or </b:skin>

.fixed_menu {
position: fixed; /*set the position type for non IE systems*/
top: 140px;
left: 0px;
width: auto;
margin: 0 0px 0px 0px;
background: #ffffff;
opacity:.900;
filter: alpha(opacity=90);
padding: 7px 5px 5px 5px;
-moz-border-radius-topright: 10px;
-moz-border-radius-topleft: 0px;
-moz-border-radius-bottomright: 10px;
-moz-border-radius-bottomleft: 0px;
}

.fixed_menu a:hover img {
position: relative;
top: 2px;
left: 2px;
border-top: 1px solid #b3b3b3;
border-left: 1px solid #b3b3b3;
border-bottom: 2px solid #999999;
border-right: 2px solid #999999;
}

.fixed_menu a { display: block; } /*Optional : This puts each link in the menu on a new line, remove if you want a horizontal menu*/

* html .fixed_menu {position:absolute;} /*IE only change the position mode of the menu*/

How to customize HTML Code

you can change the position of the menu, color, background color, margin, padding and so on.

b) HTML Code: Copy and paste the following code between <body> and </body>.

<div class='fixed_menu'>
<a href='http://YOURBLOG.blogspot.com' title='Home'>
<img src='http://wolverinehacks.googlepages.com/HomeIcon.png'/></a>

<a href='mailto:YOUR EMAIL ADDRESS' title='Mail me'>
<img src='http://wolverinehacks.googlepages.com/EmailIcon.png'/></a>

<a href='http://YOURBLOG.blogspot.com/feeds/posts/default' title='Subscribe to feed - Posts'>
<img src='http://wolverinehacks.googlepages.com/feediconblue.png'/></a>

<a href='http://YOURBLOG.blogspot.com/feeds/comments/default' title='Subscribe to feed - Comments'>
<img src='http://wolverinehacks.googlepages.com/FeedIconorange.png'/></a>

<a href='javascript:scroll(0,0)' title='Scroll to top of this page'>
<img src='http://wolverinehacks.googlepages.com/top.PNG'/></a>
</div>

How to customize HTML Code

Download Following images and save it to your server or googlepages.
Now edit links in red to desired links.

Final Words
I hope you understood everything. I am using horizontal fixed menu for Wolverine Hacks Blog. You can check it on top of this page. Soon, i will write how to make a nice horizontal fixed menu for blogger.Any doubts, comments here. So what do you have to say on this?

WH horizontal menu with mouse hover effect

Posted by Nitesh Kothari on 18 August 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit


I like experimenting with my blog every day. I try to make much better navigation for my blog, which would help the readers to access each and every post in a convenient way. Today, i will teach you how to design a Navigation menu with a dynamic submenu. When you hover over a link on topmenu, all related links to that particular menu appears on submenu.See the picture below to understand it better or live demo here.


This menu has mouse hover effect(using JavaScript).Follow the steps to use it for your blog.

Step 1: CSS Code
Take the backup of your template.Now,copy and paste the following code between <head> and <head>.
#topmenu{
background:url(http://wolverinehacks.googlepages.com/navmenu.gif) repeat-x;
height:32px;
margin:0 auto;
width:auto;
}
#topmenu ul{
height:32px;
line-height:32px;
}
#topmenu ul li{
display:inline;
}
#topmenu ul li a,
#topmenu ul li a:visited {
background:url(http://wolverinehacks.googlepages.com/linkseprator.gif) right no-repeat;
padding:0 20px;
display:block;
text-decoration:none;
float:left;
color:#4261df;
font-weight:bold;
text-shadow:#ffffff 2px 2px 2px;
}
#topmenu ul li a:hover{
color:#1532a5;background:#f2f2f2
}

#submenulinks{
width:auto;
margin:0 0 5px 0;
background:#888888 url(http://wolverinehacks.googlepages.com/navsubmenumenu.gif);
height:30px;
font-size:11px;
}
#submenulinks ul{
height:32px;
line-height:31px;
}
#submenulinks ul li{
display:inline;
}
#submenulinks ul li a,
#submenulinks ul li a:visited {
padding:0 20px;
display:block;
text-decoration:none;
float:left;
color:#FFFFFF;
}
#submenulinks ul li a:hover{
text-decoration:underline;
}

#s2, #s3{display:none;}
Download the following images and save it to your server or googlepages and change the image sources(red) in css code.
Step 2: JavaScript Code
Copy and paste following code just above </head>
<script src='http://wolverinehacks.googlepages.com/wolvimouseovermenu.js' type='text/javascript'/>
This menu has 3 submenus by default. If you want to add more then, edit the "wolvimouseovermenu.js".
for(i=1;i<=3;i++)...
If you want maximum 5 submenus, then, replace 3 to 5 in this line. Similarly Edit the HTML code also. Do not forget to change the ul id for new submenu. (eg: ID="s4")

Step 3: HTML Code
Copy and paste following code in <body> section where you want to place this menu(eg: Below Header)

 <div id='topmenu'>
<ul id='mymenu'>
<li><a href='#' onmouseover='javascript:showsubmenu(1)'>Home</a></li>
<li><a href='#' onmouseover='javascript:showsubmenu(2)'>Labels</a></li>
<li><a href='#' onmouseover='javascript:showsubmenu(3)'>Links</a></li>
<li><a href='contact.html'>Contact</a></li>
<li><a href='contact.html'>Advertise</a></li>
</ul>
</div>

<!-- SUB MENU -->
<div id='submenulinks'>
<ul id='s1'>
<li><a href='#'>Link1</a></li>
<li><a href='#'>Link2</a></li>
<li><a href='#'>Link3</a></li>
</ul>

<ul id='s2'>
<li><a href='#'>Tips</a></li>
<li><a href='#'>Tricks</a></li>
<li><a href='#'>Hacks</a></li>
<li><a href='#'>Widgets</a></li>
</ul>

<ul id='s3'>
<li><a href='#'>Link1</a></li>
<li><a href='#'>Link2</a></li>
<li><a href='#'>Link3</a></li>
</ul>
</div>
Now, save the template and check the blog. Your WH horizontal menu with mouse hover effect menu is ready for use.

Final Words:
I hope you liked WH horizontal menu with mouse hover effect menu. Is there anything that you did not understand? leave a comment with details, i will replay ASAP or get yourself updated by subscribing to our feed.

Wolverinehacks Slider menu

Posted by Nitesh Kothari on 18 July 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Today i came across this great hack named Dynamic-FX Slide-In Menu at Dynamic Drive. I modified the codes little bit to give it a perfect look like my blog... I have installed this menu at the left side of this blog and named it WH Slider Menu (i.e. WolverineHacks Slider Menu). This menu ahs many features like:

  • Ability to statically position menu on page, both x and y axis (as in demo), or simply inline
  • Support for loading link(s) in another frame or window
  • Support for multiple columns within each row
  • Fully customizable colors, dimensions etc
This script is cross browser functional (including NS6). This is menu is FF1+ IE5+ Opr7+ supported.


You can check the Dynamic Drive Instructions to install Dynamic-FX Slide-In Menu or follow my Instructions to install WH Slider Menu:


Step 1:


Download following files and upload to your webpage directory(eg: googlepages):
  1. ssm
  2. ssmItems
Download these files, only if you wish to use them from your webpage directory. Else, you can use files from Wolverine Googlepage also.

Step 2: Finally, insert the below code into the section of your page:


<style type="text/css">
<!--
A.ssmItems:link {color:black;text-decoration:none;}
A.ssmItems:hover {color:black;text-decoration:none;}
A.ssmItems:active {color:black;text-decoration:none;}
A.ssmItems:visited {color:black;text-decoration:none;}
//-->
</style>

<SCRIPT SRC="ssm.js" language="JavaScript1.2">

//Dynamic-FX slide in menu v6.5 (By maXimus, http://maximus.ravecore.com/)
//Updated July 8th, 03' for doctype bug
//For full source, and 100's more DHTML scripts, visit http://www.dynamicdrive.com

</SCRIPT>

<SCRIPT SRC="ssmItems.js" language="JavaScript1.2"></SCRIPT>

This is all you have to do...

You can modify the menu by editing "ssmItems.js" file using any text editor.

So, what do you think some changes are needed in WH Sidebar?

Comment on the post and tell me what do you think about this hack...

Cheers!!!

Labels: ,