Tabs menu in php/css

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Tabs menu in php/css

    Hi everyone, I am trying to put a tabs menu on my php site. My goal is
    having a link change color when clicked, and staying that way until the user
    stays in the section of the site it links to.
    I was thinking about using CSS and the A:active tag, but the link changes
    color only while clicking on it, and then goes back to it's default color
    when the linked section is open.
    Can anyone help me? I am sure there is a php command for this, or a right
    way to do it in CSS.


    Zink Guest

  2. Similar Questions and Discussions

    1. Horizontal Menu Controls - TABS
      In the "TimeTracker" ASP.NET Starter Kit is a horizontal Menu control or TAB strip that I want to use in my current project. Ive been able to use...
    2. ID3: Cannot set tabs
      I have a text block that won't let me set tabs with the mouse. I can type a location for a tab, and the tab appears on the ruler (in gray, not...
    3. TABS in ASP .Net
      Hi I am new to ASP .Net, I have seen some where in microsoft website they are using TABS in .aspx pages. Where I can find and use in my ASP...
    4. Tabs
      > I was curious to see if some sites such as http://www.apple.com auto generate their tabs through programming. Most sites like that server their...
    5. Top TABS
      I use to have TOP TABS on the top of the Screen where I choose the shortcuts, like if I wanna put some text on remarks, I select the text and then...
  3. #2

    Default Re: Tabs menu in php/css

    What about using the code

    list($temp, $rootdir) = split('[/]', $_SERVER['PHP_SELF']);

    if ($rootdir == 'news' )
    {
    <a href='link' class='selected'>Link</a>
    }
    else
    {
    <a href='link' class='unselected'>Link</a>
    }

    And then you'll need to define in your CSS
    the unselected for both a:visited and normal a

    Hope that helps, obviously you would need to repeat that code for each of
    your links. Its what I've done with the menu system on my site.


    "Zink" <joman@zibi.com> wrote in message
    news:AUl_c.14212$G36.7158@tornado.fastwebnet.it...
    > Hi everyone, I am trying to put a tabs menu on my php site. My goal is
    > having a link change color when clicked, and staying that way until the
    user
    > stays in the section of the site it links to.
    > I was thinking about using CSS and the A:active tag, but the link changes
    > color only while clicking on it, and then goes back to it's default color
    > when the linked section is open.
    > Can anyone help me? I am sure there is a php command for this, or a right
    > way to do it in CSS.
    >
    >

    Peter Akrill Guest

  4. #3

    Default Re: Tabs menu in php/css

    Zink wrote:
    > Hi everyone, I am trying to put a tabs menu on my php site. My goal is
    > having a link change color when clicked, and staying that way until the user
    > stays in the section of the site it links to.
    > I was thinking about using CSS and the A:active tag, but the link changes
    > color only while clicking on it, and then goes back to it's default color
    > when the linked section is open.
    > Can anyone help me? I am sure there is a php command for this, or a right
    > way to do it in CSS.
    IIRC the order of the link status is important in the css - try setting
    the order to:

    a:link
    a:visted
    a:hover
    a:active

    Regards,

    Andy
    Andy Barfield Guest

  5. #4

    Default Re: Tabs menu in php/css

    Thanks guys!


    Zink Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139