PDA

View Full Version : a:active not working in firefox (bug?)



dei9
Aug 22nd, 2004, 12:56 PM
Hi everyone, (i'm new btw :thumbsup: )

Just a quick question about the psuedo {a:active} in Firefox (0.8 Windows).

What I've got is the following code:

a.mainlink:link {font-family: arial; text-decoration:underline; font-size:14px; color:#000000; margin-left:8px;}
a.mainlink:visited {font-family: arial; text-decoration:underline; font-size:14px; color:#000000; margin-left:8px;}
a.mainlink:hover {font-family: arial; text-decoration:none; font-size:14px; font-weight:bold; color:#660066; margin-left:8px;}
a.mainlink:active {font-family: arial; text-decoration:underline; font-size:14px; font-weight:bold; color:#000000; margin-left:20px;}

in that order. Now when I go into IE 6, everything for the links work fine, the hover and the active bit, it actually jumps 20px to the left and stays black after clicking

But in Firefox that 'active' effect only happens when the mouse is clicked and held down. Hover works fine though. It reverts back to the 'hover' effect after releasing the mouse button. Surely this is not a bug? I so prefer Firefox over IE.

So any ideas guy/gals?

Thanks in advance.
Deian

p.s. I've got another question that I will posting soon about CSS links.

gsnedders
Aug 22nd, 2004, 01:23 PM
It's a bug in IE (#4056), not FireFox, FireFox does what's it's meant to...

dei9
Aug 22nd, 2004, 04:12 PM
Really? thats quite bizzare.

Anyway, it's the behaviour of the IE type of a:active (even if it is a bug) I want, I want the link to change colour once clicked on until another is clicked on). So the user knows where they are in the navigation.

Any ideas?

AaronW
Aug 22nd, 2004, 04:38 PM
Put a:link after the other 3 a:* rules.

dei9
Aug 22nd, 2004, 06:28 PM
don't work mate :confused:

Mhtml
Aug 22nd, 2004, 06:56 PM
a:focus

gsnedders
Aug 22nd, 2004, 07:07 PM
a:focus

That's what that one is... I always forget... There again, I never use it... :p

Mhtml
Aug 22nd, 2004, 07:13 PM
Yeah I've never used it myself up until my latest site.. I feel that giving feedback to the user in an obvious way as to what element currently has focus (of course this is supplimentary to the focus rectangle if it is there) is a good thing to do, at least if you have usability in mind.

dei9
Aug 22nd, 2004, 09:14 PM
wow, i didn't know about the ':focus' one, well done, u learn something new everyday

thanks for that one, yes i take usability very serious, then i do eyecandy then function, then compatibility, usability is kinda linked to compatibility and eyecandy is kinda linked to usability.

anyway.... how do i hold the focus for those groups of links.... what i've got is 5 main links and each main link has five sub link... but my problem now is (eventhough my question has been answered well and i'm not at all dissappointed... but i will milk this thread for education purposes not just for myself mind) :

how do i hold the focus for the main active link and have another one helo for the sub links etc? (get me), cos once i click on another 'link' anywhere on the page the focus is taken away from the so called active link.

any ideas about that one then guys? cheers

brothercake
Aug 23rd, 2004, 05:32 PM
You can't - only one element can have the focus at any one time.

But you could have a javacript rollover on the main link which only rolls out when the focus leaves the whole group.