Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How can I make my menu so the link to the page you are on is a different color?

How can I make my menu so the link to the page you are on is a different color?

Locked

Started by jamesdavid on 9 Jun 2008, 11:34 AM · Views: 3,375

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
9 Jun 2008, 11:34 AM
#1
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #1 by jamesdavid

How can I make my menu so the link to the page you are on is a different color. Its been done for this site here;
http://www.inksale.com/index.php?main_page=index&cPath=32

The CSS for this site is;
span.navbar-subs-selected {
color:#00FFFF;
}
I cant figure out how to modify this for my site.

My menu has the normal ‘Home’ and ‘Log In’ links, as well as my Categories, and one EZ-Page.

My site is not online yet so I cant post a link. While I figure out how to do this ive installed the default site with all the original settings.

thanks
james

9 Jun 2008, 12:01 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #2 by stevesh

If you mean the links turning pink when you put your mouse over them,

a:hover { color: #ff59ff; text-decoration: none; }

9 Jun 2008, 12:04 PM
#3
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #3 by jamesdavid

Thanks for you reply but what I mean is after you click the link, and move your mouse curser away from the link, I then want it to be bold or a different color so you know what page you are on.

On the site I gave a link for this is done with a turquoise blue.

9 Jun 2008, 12:19 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #4 by stevesh

Sorry, I didn't see the links in the header.

a:active { color: #295869; text-decoration: none; }

This won't work with your categories list - they go bold when active.

9 Jun 2008, 12:24 PM
#5
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #5 by jamesdavid

I added;

a:active { color: #295869; text-decoration: none; }

to my css but nothing happens.

9 Jun 2008, 1:57 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #6 by stevesh

I guess we'll need to see your site.

9 Jun 2008, 2:29 PM
#7
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #7 by jamesdavid

Its on my local computer so I cant give you a link.

So i can figure out how to do this Im using the default site, with the dummy catalogue you can install.

Can you help me without seeing my site as Im using the default site with all default settings?

9 Jun 2008, 2:47 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #8 by stevesh

If you find the a:active line in includes/templates/classic/stylesheet.css and change the color to what you want (it's #0000FF now) it should work. You may have to activate the categories links in the header.

9 Jun 2008, 3:45 PM
#9
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #9 by jamesdavid

When I change the a:active properties this affects the colour of the link while it is pressed down.

This is however not what im trying to edit. I want the link to change when you are on the page it links to.

On this pagel;
http://www.inksale.com/index.php?main_page=index&cPath=21
You are on 'Inkjet Cartridges', to the 'Inkjet Cartridges' link is a light blue colour.

The CSS controlling this is appears to be;
span.navbar-subs-selected

Copying and pasting this into my CSS does not make it work however.

20 Jun 2008, 2:57 PM
#10
littletoycompany avatar

littletoycompany

New Zenner

Join Date:
Mar 2007
Location:
California
Posts:
33
Plugin Contributions:
0

Post #10 by littletoycompany

jamesdavid:

When I change the a:active properties this affects the colour of the link while it is pressed down.

This is however not what im trying to edit. I want the link to change when you are on the page it links to.

On this pagel;
http://www.inksale.com/index.php?main_page=index&cPath=21
You are on 'Inkjet Cartridges', to the 'Inkjet Cartridges' link is a light blue colour.

The CSS controlling this is appears to be;
span.navbar-subs-selected

Copying and pasting this into my CSS does not make it work however.

Hey there!

Did you ever find the answer to this as I too would like the link color for the page you are on to be distinctive :smile:

I have the active link coded as follows but it doesn't work :lookaroun

a:active {
color: #9977B3
}

Thanks!!!
Janice

20 Jun 2008, 3:11 PM
#11
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #11 by jamesdavid

No, im not sure there is simple way. I think a:active is the standard way of doing this for website but it doesn't seem to work with zencart.

20 Jun 2008, 3:18 PM
#12
littletoycompany avatar

littletoycompany

New Zenner

Join Date:
Mar 2007
Location:
California
Posts:
33
Plugin Contributions:
0

Post #12 by littletoycompany

jamesdavid:

No, im not sure there is simple way. I think a:active is the standard way of doing this for website but it doesn't seem to work with zencart.

Well darn it! I am going to ask Glenn (gjh42). He is a css guru and he is very acquainted with the zen cart!! Maybe he can tell us what's going on :yes:

I will let ya know if I find something out! Thanks for the response!

Janice

20 Jun 2008, 3:20 PM
#13
jamesdavid avatar

jamesdavid

Zen Follower

Join Date:
Apr 2008
Posts:
193
Plugin Contributions:
0

Post #13 by jamesdavid

Thanks. If i ever find out ill post it here as-well.
james