CSS Dock Menu
May 8th, 2007 Filed in: Design, Mac Jump to comments
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).


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;
}
October 7th, 2008 at 5:05 am
Very nice, thank you for share
October 5th, 2008 at 1:42 pm
Absolutely amazing work buddy.
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 ..:)
September 27th, 2008 at 2:06 am
Thank you so much for this free menu (works nice on FF3)!
Very nice site and design!!
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?
September 24th, 2008 at 7:46 am
I love this CSS dock menu.. Great work..
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
September 23rd, 2008 at 1:57 am
Really wonderful. Thanks for sharing it.
DON.
September 20th, 2008 at 4:57 pm
Hi there, I have a client that requested for this effect on her site, may I know what’s the license for this? Also, is there any way to put it in a table in the middle of the page instead of the top or bottom?