New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact
Categories
Other Sections
Sweet Ads
Compatibility
Bookmark online:


FF1+ IE5+

Highlight menu effect

 Author: Dynamic Drive

Description: Add a stylish "highlight" effect to your table menus using this versatile DHTML script. A thin border is applied around the table cell (<td>) in participation as the mouse moves over it, with this effect visible in IE4+ and NS6+. Great and lightweight effect.

Demo:

Main Menu

Directions Developer's View

Step 1: Insert the following script into the <head> section of your page:

Select All

Step 2: Add the below to the <body> of your page. It contains the HTML codes for the menu:

Select All

Configuring the menu

The code of Step 2 illustrates what must be done to a standard table to have the effect applied to its cells. Firstly, have present the onMouseover=... and onMouseout=...code inside the <table> tag itself, as follows:

<table onMouseover="borderize_on(event)" onMouseout="borderize_off(event)">

Secondly and finally, for each of the table cells (<td>) that you wish the effect to be added to, add the class=... code inside it:

<td class="menulines">.......</a>

Viola!