netbalaban.net

Netbalaban.net | Professional Internet Web Design | Ozalp Balaban

CSS Dock Menu

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 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 href="#"><span>Home</span><img src="images/home.png" alt="home" /></a>

Posted 1 year, 1 month ago at 9:52 pm.

Add a comment

Highlight Image onMouseover

This example changes the opacity of any image link when the mouse moves over it using the “hover:” pseudo class of CSS. Note the two different properties used to specify opacity in CSS below. In IE 5.5+, the “filter” property is used (range: 0-100), and in Mozilla/NS6+, “-moz-opacity” (range: 0-1). Both properties are proprietary, and not formally endorsed by the W3C.

The HTML:

<a href=”http://www.cssdrive.com/”><img border=”0″ src=”test.gif”></a>
<a href=”http://www.google.com/”><img border=”0″ src=”test.jpg”></a>

The CSS:

.highlightit img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
-moz-opacity: 0.5;
}

.highlightit:hover img{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-opacity: 1;
}

http://www.cssdrive.com/index.php/examples/exampleitem/highlight_image_opacity/

Posted 1 year, 1 month ago at 1:13 am.

Add a comment