hi all,
can anybody tell me how to highlight the active tab in navigation bar...
Thank u.

<tr>
        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="15%" align="center" bgcolor="#000000"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','images/home-hover.gif',1)"><img src="images/home-main.gif" name="Image15" width="140" height="40" border="0" id="Image15" /></a></td>
            <td width="0%" align="center" valign="top" bgcolor="#000000"></td>
            <td width="15%" align="center" bgcolor="#000000"><a href="aboutus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/aboutus-hover.gif',1)"><img src="images/aboutus-main.gif" name="Image14" width="140" height="40" border="0" id="Image14" /></a></td></tr>

Recommended Answers

All 2 Replies

hi all,
can anybody tell me how to highlight the active tab in navigation bar...
Thank u.

<tr>
        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="15%" align="center" bgcolor="#000000"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','images/home-hover.gif',1)"><img src="images/home-main.gif" name="Image15" width="140" height="40" border="0" id="Image15" /></a></td>
            <td width="0%" align="center" valign="top" bgcolor="#000000"></td>
            <td width="15%" align="center" bgcolor="#000000"><a href="aboutus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/aboutus-hover.gif',1)"><img src="images/aboutus-main.gif" name="Image14" width="140" height="40" border="0" id="Image14" /></a></td></tr>

Wow. Did you let Dreamweaver make that for you? No offense but that's ugly as hell. Hover effects should be done in CSS.

Anyway, I get the idea that you want to tab to change depending on the page you're on. IE, if you're on the home page, the home button would be different from the rest.
Normally I would say use ids if you have list navigation, but you're using tables with javascript mouseovers. The easiest thing you can do is just create your highlight image and then just replace the JavaScript on each of your pages. That is the fastest way to do it for you but I still highly suggest that you remake the whole thing in a normal unordered list and style it with CSS.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.