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: « 7357 56 55 54 53 [52] 51 50 49 48 471 » Show All

  1. Gravatar
    timboi
    # 511

    May 10th, 2008 at 3:13 pm

    Hey…I’d like to have thiy very nice menu vertically…Could you send me the right “made” javascript files per email?Or have I to change the CSS-File? I’d be happy about an answeremail;)

  2. Gravatar
    India Webdesigners
    # 510

    May 10th, 2008 at 7:45 am

    Great menu!!

  3. Gravatar
    Tom
    # 509

    May 8th, 2008 at 5:35 pm

    Like the idea, would have been cool to look at the JS to see how its done as far as that goes - but I hate how you screwed it all up with some crap on one line, so im not going to bother even looking further. Deleting it, thanks anyway. Ill find some non-screwed up code for it elsewhere.

  4. Gravatar
    sanjeev gupta
    # 508

    May 1st, 2008 at 2:28 am

    i am some problem facing
    i want to vertical css menu.
    And also i want to display the css vertical dock menu on button click event.so plz help me

  5. Gravatar
    Manisha
    # 507

    April 30th, 2008 at 9:30 am

    Hi,

    Pls. i wish to have the same doc menu in vertical position. Kindly guide me.

    Thanks
    Manisha

  6. Gravatar
    Martin
    # 506

    April 30th, 2008 at 8:59 am

    Very slick, nicely done, but dear God, what the hell happened to creativity?? Must we constantly ape the likes of Apple?

  7. Gravatar
    Miguel
    # 505

    April 27th, 2008 at 10:26 pm

    Hey, i just wanted to ask you where to upload the folder at….

    into my theme folder? www? wp-content?

    sorry :/ but can somebody tell me? i really want this on my website….

  8. Gravatar
    Chunyan
    # 504

    April 27th, 2008 at 8:47 pm

    It’s very nice and fun!

  9. Gravatar
    robert
    # 503

    April 27th, 2008 at 10:07 am

    That’s really nice.
    Can I use thisn dok menu for a commercial website?

  10. Gravatar
    nedir
    # 502

    April 26th, 2008 at 12:02 pm

    thanks a lot : )
    good job, like mac menu

Pages: « 7357 56 55 54 53 [52] 51 50 49 48 471 » Show All

Post your comment