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

622 comments so far

Pages: « 6323 22 21 20 19 [18] 17 16 15 14 131 » Show All

  1. Gravatar
    Frederick
    # 172

    May 22nd, 2007 at 9:13 pm

    This is just AMAZING! I am planning in implementing iTheme on one of my sites, can you tell me how to get this going?

    Frederick

  2. Gravatar
    Some1 Helpful
    # 171

    May 22nd, 2007 at 3:19 pm

    I really enjoyed your CSS Dock Menu.However, it could use some more work.
    For one, the background is twitching as I’m browsing the menu. It would look better if it just became wider once starting to browse the menu and then stay that shape.
    Also it would be much nicer if the icons ‘clicked’ in place rather than moving by the smallest cursor movement.
    Finally, some higher res icons which go from shrunk to normal, rather than those low res ones that go from normal to enlargened would be great.

  3. Gravatar
    Steve
    # 170

    May 22nd, 2007 at 2:37 pm

    hi!

    you mention adding it to iTheme, i use it , but how do i add it?

    Thanks!

  4. Gravatar
    Kasetti
    # 169

    May 22nd, 2007 at 11:37 am

    i love ur phoenix header havent seen anything like it!

  5. Gravatar
    Mac
    # 168

    May 22nd, 2007 at 8:40 am

    Awesome, really cool

  6. Gravatar
    Uncle Bob
    # 167

    May 22nd, 2007 at 7:38 am

    Uhum… this is a P4 D920 (dual core, 3Ghz, 4Mb cache) with 2Gb ram and the CSS Dock menu moves like shit. And that’s just a docklet. Try putting that in a loaded page.

    Firefox and IE cpu usage spike through the roof.

    What’s the point of this? To have something “phun & kewl” to kill the computer?

    For FSM’s sake, we’ll all need 1500$ Quad Core Extremes for a shitty “Web 2.0 application”…

    Already my mom’s notebook has great trouble with some of the pages out there. Everybody’s switching to piss-poor interpreted javascript eyecandy, even for the most basic websites…

    I guess she can pluck 2000$ to buy a core2duo, because, gee.. everybody thinks the web should be littered with crappy interpreted code that tries to emulate native code OS GUI, but just at a 5000% speed penalty…

    I wonder why AMD and Intel even bother trying to lower the thermal envelope of their cpus when every retard out there is switching to javascript, web-based mail clients that need 20 times more cpu power than already available, cross-platform, widespread native-clients…

  7. Gravatar
    K.T.S
    # 166

    May 21st, 2007 at 9:55 pm

    It’s really good!
    Whether or not alters to longitudinally?

  8. Gravatar
    Aziz Ali
    # 165

    May 21st, 2007 at 11:58 am

    Awesome man. Simply AWESOME
    you just come up with QUALITY POSTS…. PERIOD

  9. Gravatar
    coyr
    # 164

    May 21st, 2007 at 10:29 am

    An excelent job!!;)

  10. Gravatar
    Darren
    # 163

    May 21st, 2007 at 5:35 am

    Great work. Amazing stuff. If I was being extremely picky I would say not to use the mirrored effect on the icons. But that’s me trying to find problems lol.

Pages: « 6323 22 21 20 19 [18] 17 16 15 14 131 » Show All

Post your comment





Categories