<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4686944651114032676</id><updated>2011-11-30T19:30:46.115-08:00</updated><category term='jquery'/><category term='menu'/><category term='tutorial'/><title type='text'>TUTELibrary</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tutelibrary.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4686944651114032676/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tutelibrary.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prasath</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4686944651114032676.post-2402758476192020754</id><published>2008-08-11T08:39:00.000-07:00</published><updated>2008-08-29T07:37:54.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='menu'/><title type='text'>Creating a Mac-style drop-down menu with Jquery</title><content type='html'>In this Tutorials lets see how to make a professional drop-down menu with CSS &amp;amp; Jquery. You can checkout the finished version here or download the source files here.

&lt;h3&gt;Step 01&lt;/h3&gt;
First of all we have to design the drop-down menu, I Used Photoshop to design the menu.

&lt;img src="http://farm3.static.flickr.com/2199/2757516082_1e2c2dc4d0_o.jpg" alt="Jquery drop-down menu Mockup" /&gt;
&lt;br/&gt;&lt;em&gt;this is the final Design of the dropdown menu&lt;/em&gt;

&lt;h3&gt;Step 02&lt;/h3&gt;
We need a proper plan to achieve the exact design in HTML and CSS, I used the List element to create the menu so even without the CSS the Plain HTML will still be useful !.


&lt;div class="codeview"&gt;&lt;em&gt;Basic HTML for the menu&lt;/em&gt;&lt;pre&gt;&amp;lt;div id="main_menu"&amp;gt;
&amp;lt;ul id="menu_links"&amp;gt;
    &amp;lt;li class="home_btn"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;b&amp;gt;Home&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li class="portfolio_btn"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;b&amp;gt;Portfolio&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li class="downloads_btn"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;b&amp;gt;Downloads&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li class="contact_btn"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;b&amp;gt;Contact Us&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;div style="clear:both"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/div&gt;

Here's a Simple break down of the code above
&lt;img src="http://farm4.static.flickr.com/3033/2756682325_072db4aac5_o.jpg" alt="Jquery drop-down menu HTML Explanation" /&gt;


&lt;h3&gt;Step 03&lt;/h3&gt;
Now its time to cut some images &amp;amp; write some Css
&lt;img src="http://farm4.static.flickr.com/3245/2763457696_e13757c84b_o.jpg" alt="Jquery drop-down menu Image Slices" /&gt;

&lt;em&gt;This is the Sliced Version of the Photoshop Mockup.
-There are 4 buttons so there are 8 images for the buttons (every button has 2 images, one for normal state and one for mouse over state)
-There are 4 common images Left corner, Right corner, button separator, Menu backgroud (note our background image will be scaled to fit the menu width)&lt;/em&gt;

&lt;h4&gt;Basic CSS&lt;/h4&gt;
&lt;div class="codeview" style="height: 300px;"&gt;&lt;em&gt;Basic CSS for the menu&lt;/em&gt;&lt;pre&gt;
body {
margin: 5px;
padding: 0px;
background-color: #FFFFFF;
}

#main_menu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-image: url(images/menu_bg.jpg);
background-repeat: repeat-x;
}

#main_menu #menu_links {
list-style-type: none;
display: block;
margin: 0px;
padding: 0px;
height: 41px;
background-image: url(images/right_corner.jpg);
background-repeat: no-repeat;
background-position: right center;
}

#main_menu #menu_links li {
float: left;
display: block;
height: 41px;
background-image: url(images/menu_seperator.jpg);
padding-left: 8px;
background-repeat: no-repeat;
}

#main_menu #menu_links li a {
display: block;
text-decoration: none;
height: 41px;
}

#main_menu #menu_links li a b {
display: none;
}

#main_menu #menu_links .home_btn,#main_menu #menu_links .home_btn_hover{
background-image: url(images/left_corner.jpg);
padding-left: 4px;
}

#main_menu #menu_links .home_btn a{
background-image: url(images/home_normal_btn.jpg);
width: 50px;
}

#main_menu #menu_links .portfolio_btn a{
background-image: url(images/portfolio_normal_btn.jpg);
width: 62px;
}

#main_menu #menu_links .downloads_btn a{
background-image: url(images/dnlds_normal_btn.jpg);
width: 78px;
}

#main_menu #menu_links .contact_btn a{
background-image: url(images/contact_normal_btn.jpg);
width: 78px;
}

#main_menu #menu_links .home_btn_hover a{
background-image: url(images/home_hover_btn.jpg);
width: 50px;
}

#main_menu #menu_links .portfolio_btn_hover a{
background-image: url(images/portfolio_hover_btn.jpg);
width: 62px;
}

#main_menu #menu_links .downloads_btn_hover a{
background-image: url(images/dnlds_hover_btn.jpg);
width: 78px;
}

#main_menu #menu_links .contact_btn_hover a{
background-image: url(images/contact_hover_btn.jpg);
width: 78px;
}

#main_menu #menu_links li #portfolio_menu{
left: 63px;
z-index: 200;
}

#main_menu #menu_links li #downloads_menu{
left: 133px;
z-index: 199;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4686944651114032676-2402758476192020754?l=tutelibrary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tutelibrary.blogspot.com/feeds/2402758476192020754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4686944651114032676&amp;postID=2402758476192020754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4686944651114032676/posts/default/2402758476192020754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4686944651114032676/posts/default/2402758476192020754'/><link rel='alternate' type='text/html' href='http://tutelibrary.blogspot.com/2008/08/creating-mac-style-drop-down-menu-with.html' title='Creating a Mac-style drop-down menu with Jquery'/><author><name>Prasath</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
