View Full Version : How do I make it so that the Tab I am in is different than the rest?

08-14-2006, 05:46 PM
I know there must be a simple way to do this. I'm trying to make so (to use the above tabs as example) when I am in the Rules section, the Rules tab appears different than the other tabs. Does anyone have any idea? Thanks.

08-14-2006, 06:16 PM
Just edit the tab from the corresponding page.

08-14-2006, 06:19 PM
I can't, because the tab for the page is the part of an overall image at the top. I would have to remake every individual image to do that. I think it would be much easier to use javascript to insert the alternate image whenever I was in a certain page.

08-14-2006, 06:31 PM
Why don't you use individual images? It's the only way (I can think of) of switching a tab for a menu.

08-18-2006, 02:36 AM
Solution if you are using php:

I wanted the same thing for my page and had a solution that sadly didnt work in Opera so I fixed it myself with the knowledge I picked up at a php tutorial yesterday:

I made 2 sets of CSS code for my tabs: 1 for normal tabs and 1 for highlighted tabs. I called them .tabs_on and .tabs_off. I inserted some php code in my page that reads which page I'm looking at and then inserts the right css tag into the code.

<div class="tabs_<?php if ( $page == "home" ) {echo "on";} else {echo "off";} ?>" align="center">

If you were looking at "www.....com/index.php?page=home", then the php would make the class of the tab "tabs_on", so the highlighted css would be used. Anyway, it worked for me