amaher1
12-07-2005, 06:45 PM
Hello,
I am new to CSS. I have a menu:
Item 1 | Item 2 | Item 3 | Item 4 |
When you click on Item 1 and go to its page, lets say item1.html I would like the link to be a different color or more specifically the background color to be different.
I have found this guide:
http://www.456bereastreet.com/archive/200503/setting_the_current_menu_state_with_css/
But I did was unable to get it to work.
My html code for the items links look like:
<div class="navbar">
<a href="/emg_systems/ma-300.html" class="navbar"> EMG Systems </a> <IMG SRC="/img/bullettab.gif">
……other links…..
</div>
As in the guide I found, I tried assigning ID's to a span both before and after the a href's- neither way worked, is it because my a href’s already have a class?
Just FYI- After I figure this out, I want to make a submenu on each page. So after clicking Item 1 you get:
Item 1 | Item 2 | Item 3 | Item 4 |
section a | Section b | section c
And I want "Item 1" to stay highlighted on all the subpages...
If there a better way to do this?
Any help is great!
Thanks,
amanda
I am new to CSS. I have a menu:
Item 1 | Item 2 | Item 3 | Item 4 |
When you click on Item 1 and go to its page, lets say item1.html I would like the link to be a different color or more specifically the background color to be different.
I have found this guide:
http://www.456bereastreet.com/archive/200503/setting_the_current_menu_state_with_css/
But I did was unable to get it to work.
My html code for the items links look like:
<div class="navbar">
<a href="/emg_systems/ma-300.html" class="navbar"> EMG Systems </a> <IMG SRC="/img/bullettab.gif">
……other links…..
</div>
As in the guide I found, I tried assigning ID's to a span both before and after the a href's- neither way worked, is it because my a href’s already have a class?
Just FYI- After I figure this out, I want to make a submenu on each page. So after clicking Item 1 you get:
Item 1 | Item 2 | Item 3 | Item 4 |
section a | Section b | section c
And I want "Item 1" to stay highlighted on all the subpages...
If there a better way to do this?
Any help is great!
Thanks,
amanda