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


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.
May 22nd, 2007 at 2:37 pm
hi!
you mention adding it to iTheme, i use it , but how do i add it?
Thanks!
May 22nd, 2007 at 11:37 am
i love ur phoenix header havent seen anything like it!
May 22nd, 2007 at 8:40 am
Awesome, really cool
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…
May 21st, 2007 at 9:55 pm
It’s really good!
Whether or not alters to longitudinally?
May 21st, 2007 at 11:58 am
Awesome man. Simply AWESOME
you just come up with QUALITY POSTS…. PERIOD
May 21st, 2007 at 10:29 am
An excelent job!!;)
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.
May 20th, 2007 at 3:55 pm
Trying to make this awesome little dock work so that I can customize it, but I haven’t got it quite right as of yet.
Anyone want to tell me what I’m doing wrong?
http://www.angelfire.com/wv/TheScorpionLair/dock/css-dock.html
http://www.angelfire.com/wv/TheScorpionLair/dock/style.css
Thanks in advance!