A bunch of buttons

An example of the Port Hole Theory.
These buttons give a push down effect if you hover over them with the mouse. They aren't made with javascript but with css styles, so it will work also if javascript is disabled on the computer of the visitor of the page. Everything is not in six different images, but just in one image!

  •  
  •  
  •  

Advantages:

How to get these buttons?

the drawing

easy html

copy and paste!

The drawing

In a paint program you can make the buttons side aside in one image. On the left hand are all buttons in the normal state. On the right hand all buttons in the push down state if the mouse will be hovering over them. The buttons left and right have the same width of course. You will get something like this:
 

het blokje knoppen in 1 image

(width is here: 2 times 150px; height 3 times 25px)

Easy html

In the html of the page there will be only something like:

<ul id="buttonblock">
   <li id="button1"><a href="link1.htm"></a></li>
   <li id="button2"><a href="link2.htm"></a></li>
   <li id="button3"><a href="link3.htm"></a></li>
</ul>

Copy and paste!

The exact code is in two small copy/paste files:

In the code is pointed what you have to change to use your own image and your own links.
Everything together you can see in the source code of this page.
It is possible to give a button a different height, if needed, with a small adaptation of the code. And in case you want more buttons, you just extend the image; the code lines for a new button are easy to implement.
Success!

[short English translation]

francky kleyneman 17 aug. 2006

 

 

Valid HTML 4.01 Transitional

Valid CSS

mail francky?
mail francky!

 

nederlands * dutch