N.Design Studio

CSS Dock Menu

Filed in: Design, Mac Jump to comments

CSS dock menu

If you are a big Mac fan, you will love this CSS dock menu that I designed. It is using Jquery Javascript library and Fisheye component from Interface and some of my icons. It comes with two dock styles - top and bottom. This CSS dock menu is perfert to add on to my iTheme. Here I will show you how to implement it to your web page.

Download CSS Dock Menu

(View Demo)
Zip package included JS, CSS, and icons

1. Download source files

Download the CSS dock menu zip package.

2. Insert code

In between the HTML <head> tag, add the following code

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/interface.js"></script>

<link href="style.css" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<style type="text/css">
.dock img { behavior: url(iepngfix.htc) }
</style>
<![endif]–>

The first part is the Javascript, second part is CSS stylesheet, and last part is the PNG hack to display probably in IE 6.

3. Configuration

Don’t forget to add the following code to anywhere within the <body> tag:

<script type="text/javascript">
$(document).ready(
function()
{
$(’#dock2′).Fisheye(
{
maxWidth: 60,
items: ‘a’,
itemsText: ’span’,
container: ‘.dock-container2′,
itemWidth: 40,
proximity: 80,
alignment : ‘left’,
valign: ‘bottom’,
halign : ‘center’
}
)
}
);
</script>

4. Add or remove item

To add menu item to the top dock (note: span tag is after the img tag):

<a class="dock-item" href="#"><img src="images/home.png" alt="home" /><span>Home</span></a>

To add menu item to the bottom dock (note: span tag is before the img tag):

<a class="dock-item2" href="#"><span>Home</span><img src="images/home.png" alt="home" /></a>

Browser Compatibility

I have tested on IE 6, IE 7, Opera 9, Firefox 2, and Safari 2 (although there are some minor rendering issues with Safari).

513 comments so far

Pages: « 5248 47 46 45 44 [43] 42 41 40 39 381 » Show All

  1. Gravatar
    moda
    # 423

    February 18th, 2008 at 4:11 pm

    incredible! now, I have to find some trasparent png’s for my new dock :D

  2. Gravatar
    Epoc
    # 422

    February 18th, 2008 at 3:49 pm

    Wonderful ! o_O

  3. Gravatar
    Fernando
    # 421

    February 18th, 2008 at 12:55 pm

    Well Well doesn’y work, i proved with all ways that i have it but nothing, when i upload the js and css files to googlepages it’s ok, but at the time tu put the code, the img appears, the text appears, but the effect don’t, so you can help me?? maybe if a send you the files you puted ok and send it to me??

    Thanx, i love this style of menu so i want it

  4. Gravatar
    furkhan
    # 420

    February 17th, 2008 at 7:14 pm

    Vov. This is very good. It’s better than other blogs.

  5. Gravatar
    hardy
    # 419

    February 16th, 2008 at 6:17 pm

    i dont know how to use so please can u suggest me how to use this
    thank u

  6. Gravatar
    Luli
    # 418

    February 14th, 2008 at 1:36 pm

    This work with fonts?
    I mean: Can I make this effect with text?
    No images.

  7. Gravatar
    Tanie kredyty
    # 417

    February 14th, 2008 at 6:12 am

    Can I use your script on my site. Its so great in my opinion and work in IE and FF.

  8. Gravatar
    Somebody
    # 416

    February 13th, 2008 at 10:20 am

    But,could u make it without by jquery ,with normal js ? 3Ks!

  9. Gravatar
    Somebody
    # 415

    February 13th, 2008 at 10:14 am

    Amazing,could u tell me how it works?

  10. Gravatar
    gabriele
    # 414

    February 11th, 2008 at 10:22 pm

    What kind of license has the script? Can i use it in my site?

Pages: « 5248 47 46 45 44 [43] 42 41 40 39 381 » Show All

Post your comment





Categories