a:active not registering on navigation menu [SOLVED]
doing ".mod_navigation a:active" and trying to create a solid color background w/white text... but it doesn't seem to want to change. a:link/visited/hover work fine but not a:active... anyone know why? thanks!
~Mecha
P.S. Hope everyone in the states had a good Halloween weekend XD
Re: a:active not registering on navigation menu
Can you provide a link to the site?
Re: a:active not registering on navigation menu
Quote:
Originally Posted by qrczak
Can you provide a link to the site?
i don't have the site hosted, working out of a test box. =/
Re: a:active not registering on navigation menu
Code:
/* Nav Color */
.mod_navigation a:link,
.mod_navigation a:visited
{
text-decoration:none;
color:#808080;
}
/* Nav Hover */
.mod_navigation a:hover
{
width:200px;
height:25px;
float:right;
margin-bottom:2px;
padding-top:1px;
background-color:#396585;
text-decoration:none;
color:#ffffff;
}
/* Mod Active Link */
.mod_navigation a:active
{
background-color:#808080;
color:#ffffff;
All but the last entry works fine...
Re: a:active not registering on navigation menu
Where you have placed the navigation module? Can you provide the relevant part of the generated HTML source code here? You can try to add the according ID selector to be more specific...
Do you have already inspected the relevant source code with Firebug? That would be always a good idea... ;)
Re: a:active not registering on navigation menu
Quote:
Originally Posted by mechaflash
All but the last entry works fine...
In the last rule there is no closing bracket.
Re: a:active not registering on navigation menu
found a solution... use ".mod_navigation span" instead of the ".mod_navigation a:active"... as "span" is what indicates the "active" link in the nav module... Ty Firebug XD
Re: a:active not registering on navigation menu
Quote:
Originally Posted by mechaflash
found a solution... use ".mod_navigation span" instead of the ".mod_navigation a:active"... as "span" is what indicates the "active" link in the nav module... Ty Firebug XD
Ahh, you wanted to style the active menu item in your navigation.
You can of course also write ".mod_navigation span.active { ... }" to select this specific "active" menu item (which obviously is no anchor element)
Re: a:active not registering on navigation menu
Quote:
Originally Posted by xchs
Quote:
Originally Posted by mechaflash
found a solution... use ".mod_navigation span" instead of the ".mod_navigation a:active"... as "span" is what indicates the "active" link in the nav module... Ty Firebug XD
Ahh, you wanted to style the active menu item in your navigation.
You can of course also write ".mod_navigation span.active { ... }" to select this specific "active" menu item (which obviously is
no anchor element)
What i don't understand is that I was using .mod_navigation a:active... which is supposed to target the current active link in the navigation module... but it wasn't working. After looking at the module coding via firebug, I did notice that within the module, the current active link is enclosed in <span> so I used that... BUT it should've worked either way. I wonder why it didn't... :?
Re: a:active not registering on navigation menu [SOLVED]
As I said before: The current menu item is NO anchor element ("a"). You are always talking about active links, although you'd have to select the active menu item with the <span> HTML element.
Re: a:active not registering on navigation menu [SOLVED]
Okay I get it now... in the nav the anchor "a" doesn't exist, thus span or span.active must be used because span is the anchor for the active link in the navigation module... right? lol sorry I'm new to this if you can't tell =P
Re: a:active not registering on navigation menu [SOLVED]
You could always change the template so the active link can also be an anchor. ;)
Re: a:active not registering on navigation menu [SOLVED]
Quote:
Originally Posted by Vera
You could always change the template so the active link can also be an anchor. ;)
now that's just doing too much work vera :D