...

View Full Version : Help with a tab menu



horatiub
01-04-2007, 06:20 PM
I've been trying to get the menu working properly and no go. I'm almost ready to give up.

my site is :www.yvib.com/alicia

basically what I want is the the tabs color to change to blue after they I clicked on them. For example, if I press on the blog page, I want that tab to become blue.

here is my CSS code:


/* Navigation menu */
#navigation {
padding-left: 30px;
}
#navigation ul{
list-style:none;
margin:0;
padding:0;
}
#navigation li{
float:left;
height:27px;
padding-left:12px;
background:url(images/tabs_reg_l.png) no-repeat left top;
}
#navigation li a {
font-family: "Trebuchet MS", verdana, helvetica, arial, sans-serif;
font-weight: bold;
font-size: 1.1em;
color: #515151;
padding:7px 14px 0 2px;
text-decoration: none;
float:left;
background:url(images/tabs_reg_r.png) no-repeat right top;
height:20px;
}
#navigation li.current{ background:url(images/tabs_active_l.png) no-repeat left top;}
#navigation li.current a{ background:url(images/tabs_active_r.png) no-repeat right top;}
#navigation a:hover{color:#c00;}
#navigation li.current a{color:#fff}

and this is the menu code:

<td id="navigation"><!-- breadcrumbs -->
<ul>
<li><a accesskey="d" href="?L=users.desktop">My Desktop</a></li>

<li><a href="?L=contacts.contacts">My Contacts</a></li>
<li> <a accesskey="s" href="?L=search.users">Search</a></li>
<li><a accesskey="b" href="?L=blogs.browse">Blogs</a></li>
<li><a href="?L=chat.chat">Chatrooms</a></li>
<li><a accesskey="f" href="?L=inkspot.index">Inkspot</a></li>
</ul>

<!-- /breadcrumbs --></td>

thank you so much in advance, if I can get this to work, I would really appreciate it

Pennimus
01-04-2007, 06:36 PM
You need some server side code to establish which page you're on and then change the style of the tab.

This type of thing can't be acomplished with pure html and css.

horatiub
01-04-2007, 06:38 PM
You need some server side code to establish which page you're on and then change the style of the tab.

This type of thing can't be acomplished with pure html and css.

php or javascript? and is this going to slow down things a little bit?

Karen S. Garvin
01-04-2007, 08:08 PM
Is this this kind of thing that Ajax would be good at?

horatiub
01-04-2007, 08:11 PM
Is this this kind of thing that Ajax would be good at?

I'm not sure since I've never worked with Ajax

harbingerOTV
01-05-2007, 01:17 AM
http://photomatt.net/scripts/intellimenu/

I know there are others but that one came up qick on a search.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum