Tabs menu in php/css

This is a discussion on Tabs menu in php/css within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi everyone, I am trying to put a tabs menu on my php site. My goal is having a link ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-04-2004
Zink
 
Posts: n/a
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.


Reply With Quote
  #2 (permalink)  
Old 09-04-2004
Peter Akrill
 
Posts: n/a
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.
>
>



Reply With Quote
  #3 (permalink)  
Old 09-04-2004
Andy Barfield
 
Posts: n/a
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
Reply With Quote
  #4 (permalink)  
Old 09-05-2004
Zink
 
Posts: n/a
Default Re: Tabs menu in php/css

Thanks guys!


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:00 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0