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.

Update: I no longer support the questons regard this script. If you like the HiGloss icons used in the demos, you can get them as stock icons at IconDock.

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 for 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).

721 comments so far

Pages: « 7316 15 14 13 12 [11] 10 9 8 7 61 » Show All

  1. Gravatar
    Emexci
    # 101

    May 10th, 2007 at 11:16 am

    we all know, that you are a css freak :)

    great menu “nick”, congrats mann…

  2. Gravatar
    aronil
    # 100

    May 10th, 2007 at 11:00 am

    Thanks a lot for this Nick, Actually i want to thank you for a lot of things. You have made my journey of designing and coding a lot easier with your templates and other designing tutorials. And I’m further motivated by how you started all by self-taught. Hands down to you mate!

  3. Gravatar
    Stijn
    # 99

    May 10th, 2007 at 10:02 am

    That CSS menu is fracking awesome! I have GOT to know how this works!

  4. Gravatar
    Linker
    # 98

    May 10th, 2007 at 9:51 am

    !!!Exelent, an extraordinary application and without flash

  5. Gravatar
    Nick
    # 97

    May 10th, 2007 at 9:26 am

    Wow. I must say it’s really impressive :) Runs well on firefox under debian 4.0 on a 7 year old Athlon 800mhz box. :) Very nice!!!

  6. Gravatar
    kaskooye
    # 96

    May 10th, 2007 at 8:54 am

    Great job ! Thanks for sharing.

  7. Gravatar
    jey
    # 95

    May 10th, 2007 at 8:13 am

    thanks a lot for this very beautiful dock

  8. Gravatar
    Haitham
    # 94

    May 10th, 2007 at 7:22 am

    very very nice! Now my browser’s page menu looks like a Mac! but how do I get it to anchor to the bottom of the page when it scrolls down or up, staying in the same position on the browser window? :)

  9. Gravatar
    Oli
    # 93

    May 10th, 2007 at 4:34 am

    Thats awsome! Loving it!!!

  10. Gravatar
    wing
    # 92

    May 10th, 2007 at 3:27 am

    非常非常地喜爱!!!kiss you!!

Pages: « 7316 15 14 13 12 [11] 10 9 8 7 61 » Show All

Post your comment