CSS: active link?

F

Frank P.

A.menu {
COLOR:#003366;
font-weight: bold;
text-decoration: underline;
}

A.menu:hover {
COLOR:#990000;
text-decoration : none;
}

A.menu:active {
COLOR: #FFFFFF;
background:#003366;
text-decoration: none;
}

This works fine in IE. However A.menu:active does not work in
Mozilla/K-Meleon, hover does. Why? Is there a way around this?

F.y.i., it's a menu in a frameset, no lectures on how bad using frames
is, please.

Frank P.
 
S

Sam Hughes

A.menu {
COLOR:#003366;
font-weight: bold;
text-decoration: underline;
}

A.menu:hover {
COLOR:#990000;
text-decoration : none;
}

A.menu:active {
COLOR: #FFFFFF;
background:#003366;
text-decoration: none;
}

This works fine in IE. However A.menu:active does not work in
Mozilla/K-Meleon, hover does. Why? Is there a way around this?

That's because Gecko applies the active pseudo-class while the mouse
button is being held down. If you want it to remain white, apply the
rule to the focus pseudo-class as well.

A.menu:active, A.menu:focus {
COLOR: #FFFFFF;
background:#003366;
text-decoration: none;
}

By the way, if you're lazy, you can type #FFFFFF as #FFF in CSS. And #
003366 can be #036. (#aabbcc can be #abc.)
F.y.i., it's a menu in a frameset, no lectures on how bad using frames
is, please.

Let the framezoids be cast away into a pit with the followers of Mammon!
:p
 
C

C A Upsdell

Sam Hughes said:
By the way, if you're lazy, you can type #FFFFFF as #FFF in CSS. And #
003366 can be #036. (#aabbcc can be #abc.)

#nnn is not supported by some legacy browsers.
 
J

Jukka K. Korpela

rf said:
C A Upsdell wrote

Which specific ones?

None. Or none that would matter - such browsers would get CSS horribly
wrong anyway, so the best you could do with them, if you care, is to use
some of the usual tricks to prevent them seeing your style sheet at all.

In HTML, color="#FFF" is incorrect (but valid), of course. But let's not
confuse this with CSS.
 
R

rf

Jukka K. Korpela wrote
None. Or none that would matter - such browsers would get CSS horribly
wrong anyway, so the best you could do with them, if you care, is to use
some of the usual tricks to prevent them seeing your style sheet at all.

Thankyou for that information Jukka. My thoughts exactly :)

However I was calling C A Upsdell to task, asking for provision of a browser
to follow up the above claim.
 
N

Nik Coughin

brucie said:
in post: <


but... but... but... 'n' isn't part of the base16 number system.

My thoughts exactly brucie. I think the OP will find that colors using
base24 are not supported by ANY browser. AFAIK.
 
N

Nik Coughin

Nik said:
My thoughts exactly brucie. I think the OP will find that colors
using base24 are not supported by ANY browser. AFAIK.

My apologies. Mr Upsdell, not Mr P.
 
T

Toby Inkster

rf said:
C A Upsdell wrote


Which specific ones?

Any of them ones what don't support CSS?

CAUpsdellsMadeUpBrowserThatSupportsCSSButNotThreeDigitColours version 2.4?
 
F

Frank P.

Sam Hughes said:
That's because Gecko applies the active pseudo-class while the mouse
button is being held down. If you want it to remain white, apply the
rule to the focus pseudo-class as well.

A.menu:active, A.menu:focus {
COLOR: #FFFFFF;
background:#003366;
text-decoration: none;

Thank you. It's certainly an improvement but things in
Mozilla/K-Meleon are still different from IE. The link background only
remains white until another mouse click (anywhere on the screen),
whereas in IE it remains white until a mouse click on another menu
link.

Frank P.
 
R

rf

Frank said:
Thank you. It's certainly an improvement but things in
Mozilla/K-Meleon are still different from IE. The link background only
remains white until another mouse click (anywhere on the screen),
whereas in IE it remains white until a mouse click on another menu
link.

They are different browsers. Get used to it :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top