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

592 comments so far

Pages: [60] 59 58 57 56 55 54 53 52 51 501 » Show All

  1. Gravatar
    oviyen
    # 592

    October 8th, 2008 at 8:40 am

    This is really awesome. I am searching for stuffs like this for my art work portal. :) Its really good.

  2. Gravatar
    Stephen Adams
    # 591

    October 7th, 2008 at 12:48 pm

    Hey there! I’m looking to make a taskbar that actually clips itself to the bottom of the page no matter where you scroll. If inserting your code here, it works fine until the page scrolls, and then the effect of hovering over the icons gradually loses its proximity. An example would be putting your html in , where the css for the toolbar is defined as follows: #toolbar
    {
    position: fixed !important;
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    height: 100px;
    min-height: 100px;
    z-index: 20;
    background: url(../images/bg_gradient_toolbar.gif) repeat-x;
    background-position: bottom left;
    text-align: center;
    }

  3. Gravatar
    icon search engine
    # 590

    October 7th, 2008 at 5:05 am

    Very nice, thank you for share

  4. Gravatar
    Troels
    # 589

    October 5th, 2008 at 1:42 pm

    Absolutely amazing work buddy.

  5. Gravatar
    Piyush
    # 588

    October 1st, 2008 at 12:01 pm

    Hey man.. This dock is really cool… But is there any way of using an image strip with your current code.. I’ve tried with the background image style attribute, but the image resize results in undesired effects… If your answer is NO… could you please release the source of your dock… I know its a lot to ask, but its always great to do charity ..:)

  6. Gravatar
    stephanzr
    # 587

    September 27th, 2008 at 2:06 am

    Thank you so much for this free menu (works nice on FF3)!
    Very nice site and design!!

  7. Gravatar
    tico
    # 586

    September 25th, 2008 at 10:58 am

    wow, good css menu. but I have a problem, i open with frontpage and the menu dont run well, dont read the images and other things, why?

  8. Gravatar
    Caiden
    # 585

    September 24th, 2008 at 7:46 am

    I love this CSS dock menu.. Great work..

  9. Gravatar
    TeknoMobi
    # 584

    September 23rd, 2008 at 6:51 pm

    Css Dock MenĂ¼ Blogger Entegration Tutorial Turkish Langue Visit to http://teknomobi.blogspot.com/2008/09/blogger-css-dock-menu-design-tutorial.html

  10. Gravatar
    deluxdon
    # 583

    September 23rd, 2008 at 1:57 am

    Really wonderful. Thanks for sharing it.

    DON.

Pages: [60] 59 58 57 56 55 54 53 52 51 501 » Show All

Post your comment





Categories