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: « 7321 20 19 18 17 [16] 15 14 13 12 111 » Show All

  1. Gravatar
    Trisha
    # 151

    May 17th, 2007 at 12:59 am

    This is really great, but it’s not very “accessible”….

  2. Gravatar
    emcevo
    # 150

    May 16th, 2007 at 9:14 pm

    gud day guys! has anyone use this code to the EXPONENTCMS?? Im a bit confuse in coding it..

    OIiver
    # 146

    May 16th, 2007 at 4:35 am

    @Nirke -
    1) open zip
    2) upload js/ and css/ folders to your server
    3) include references to js and css in your document head (as in the example docs)
    4) create an unordered list of links (as in the example docs)
    5) include the $(document).ready(){…} call in the body at the end (as in the example docs)

    Your tone could be a little less aggressive next time you ask for help: if there aren’t any instructions it’s because the examples could not be more self-explanatory.

    WP has nothing to do with this.

    Is there a website in converting the codes to a “smarty codes” w/c is use in the unordered list.tpl..??? ty

  3. Gravatar
    MTXTeamLeader
    # 149

    May 16th, 2007 at 5:50 pm

    Wow! It’s wonderful.
    Thanks so much.

  4. Gravatar
    rob-ot
    # 148

    May 16th, 2007 at 8:53 am

    ok, this is VERY NICE !!
    great job

  5. Gravatar
    Sean Harvey
    # 147

    May 16th, 2007 at 7:48 am

    Very nice. :-)

  6. Gravatar
    OIiver
    # 146

    May 16th, 2007 at 4:35 am

    @Nirke -
    1) open zip
    2) upload js/ and css/ folders to your server
    3) include references to js and css in your document head (as in the example docs)
    4) create an unordered list of links (as in the example docs)
    5) include the $(document).ready(){…} call in the body at the end (as in the example docs)

    Your tone could be a little less aggressive next time you ask for help: if there aren’t any instructions it’s because the examples could not be more self-explanatory.

    WP has nothing to do with this.

  7. Gravatar
    Adrian
    # 145

    May 16th, 2007 at 2:33 am

    Amazing!
    I also wrote an article about it at my blog http://blog.akpix.de

  8. Gravatar
    Oseary
    # 144

    May 16th, 2007 at 12:34 am

    I’m a bit confused on where the coding goes in… Which actual file does the coding get added in???

  9. Gravatar
    Justin
    # 143

    May 15th, 2007 at 6:45 pm

    a { outline: none }

    You’ll want to include this in the CSS so firefox users don’t get that outline when they click on one of the links.

  10. Gravatar
    Nirke
    # 142

    May 15th, 2007 at 6:42 pm

    How does this work really?
    what should I do with the zip file?

    U failed to include full installation instructions and several people here are not that familiar with WP..

Pages: « 7321 20 19 18 17 [16] 15 14 13 12 111 » Show All

Post your comment