Results 1 to 5 of 5

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

  1. #1
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I make it so that the Tab I am in is different than the rest?

    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.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Just edit the tab from the corresponding page.
    - Mike

  3. #3
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Why don't you use individual images? It's the only way (I can think of) of switching a tab for a menu.
    - Mike

  5. #5
    Join Date
    Oct 2005
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    PHP 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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •