HighDots Forums  

Active selector

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Active selector in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Smith
 
Posts: n/a

Default Active selector - 06-11-2009 , 09:31 AM






From: http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes

"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "

Take the following fragment.

<style>
a:active{color:red}
</style>
<a href="#">test</a>

This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.

Is that not what the :focus selector should do?

Is there a css workaround for this or will I have to resort to
javascript?

Thanks

Reply With Quote
  #2  
Old   
Adrienne
 
Posts: n/a

Default Re: Active selector - 06-11-2009 , 10:12 AM






Gazing into my crystal ball I observed Mark Smith writing in
<4d7bf38c-0f9e-4188-8be0-d4ead5c07858 (AT) y17g2000yqn (DOT) googlegroups.com>:

Quote:
From: http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes

"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "

Take the following fragment.

style
a:active{color:red}
/style
a href="#">test</a

This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.

Is that not what the :focus selector should do?

Is there a css workaround for this or will I have to resort to
javascript?

Thanks
Leave it alone. If IE users are used to seeing that,
and it suddenly changes, they might be confused and think something is
wrong.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Reply With Quote
  #3  
Old   
Mark Smith
 
Posts: n/a

Default Re: Active selector - 06-11-2009 , 11:08 AM



On Jun 11, 3:12*pm, Adrienne <arb... (AT) yahoo (DOT) com> wrote:
Quote:
Gazing into my crystal ball I observed Mark Smith writing in
4d7bf38c-0f9e-4188-8be0-d4ead5c07... (AT) y17g2000yqn (DOT) googlegroups.com>:



From:http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes

"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "

Take the following fragment.

style
* *a:active{color:red}
/style
a href="#">test</a

This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.

Is that not what the :focus selector should do?

Is there a css workaround for this or will I have to resort to
javascript?

Thanks

Leave it alone. *If IE users are used to seeing that,
and it suddenly changes, they might be confused and think something is
wrong.

No. With the style I am using it looks totally wrong.

Reply With Quote
  #4  
Old   
Jeff
 
Posts: n/a

Default Re: Active selector - 06-11-2009 , 01:49 PM



Mark Smith wrote:
Quote:
On Jun 11, 3:12 pm, Adrienne <arb... (AT) yahoo (DOT) com> wrote:
Gazing into my crystal ball I observed Mark Smith writing in
4d7bf38c-0f9e-4188-8be0-d4ead5c07... (AT) y17g2000yqn (DOT) googlegroups.com>:



From:http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes
"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "
Take the following fragment.
style
a:active{color:red}
/style
a href="#">test</a
This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.
Is that not what the :focus selector should do?
Is there a css workaround for this or will I have to resort to
javascript?
Thanks
Leave it alone. If IE users are used to seeing that,
and it suddenly changes, they might be confused and think something is
wrong.


No. With the style I am using it looks totally wrong.
Then use javascript to set the style for that element using
onmousedown and onmouseup. It will work for the 95% of all average
surfers and also 5% of all group regulars (ie, those with js on).

I don't recall ever having had a use for active, myself.

Jeff

Reply With Quote
  #5  
Old   
Adrienne
 
Posts: n/a

Default Re: Active selector - 06-11-2009 , 07:00 PM



Gazing into my crystal ball I observed Mark Smith writing in
<6c77bf67-38ed-41b9-8151-d12ebad13e25 (AT) l12g2000yqo (DOT) googlegroups.com>:

Quote:
On Jun 11, 3:12*pm, Adrienne <arb... (AT) yahoo (DOT) com> wrote:
Gazing into my crystal ball I observed Mark Smith writing in
4d7bf38c-0f9e-4188-8be0-d4ead5c07... (AT) y17g2000yqn (DOT) googlegroups.com>:



From:http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes

"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "

Take the following fragment.

style
* *a:active{color:red}
/style
a href="#">test</a

This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.

Is that not what the :focus selector should do?

Is there a css workaround for this or will I have to resort to
javascript?

Thanks

Leave it alone. *If IE users are used to seeing that,
and it suddenly changes, they might be confused and think something is
wrong.


No. With the style I am using it looks totally wrong.
URL?

Again, you are trying to mess with the UA, the way the UA works to be
specific. I wouln't mind having a differently colored car, with other
features, but if suddenly my car is braking a different way than it
usually does, I'm going to be worried.

I don't use IE, but if I did, I would be used to that kind of behaivor,
and be assured that I had infact clicked on something. Without that, I
might keep on clicking or something.

I would strongly advise against messing with the UA.

--
Adrienne Boswell at
Home Arbpen Web Site Design Services http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Reply With Quote
  #6  
Old   
Mark Smith
 
Posts: n/a

Default Re: Active selector - 06-12-2009 , 04:34 AM



On Jun 12, 12:00*am, Adrienne <arb... (AT) yahoo (DOT) com> wrote:
Quote:
Gazing into my crystal ball I observed Mark Smith writing in
6c77bf67-38ed-41b9-8151-d12ebad13... (AT) l12g2000yqo (DOT) googlegroups.com>:



On Jun 11, 3:12*pm, Adrienne <arb... (AT) yahoo (DOT) com> wrote:
Gazing into my crystal ball I observed Mark Smith writing in
4d7bf38c-0f9e-4188-8be0-d4ead5c07... (AT) y17g2000yqn (DOT) googlegroups.com>:

From:http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes

"The :active pseudo-class applies while an element is being activated
by the user. For example, between the times the user presses the mouse
button and releases it. "

Take the following fragment.

style
* *a:active{color:red}
/style
a href="#">test</a

This works as described in Firefox. But in IE, the style applies after
the mouse button is released. In fact is still applies until the link
loses focus.

Is that not what the :focus selector should do?

Is there a css workaround for this or will I have to resort to
javascript?

Thanks

Leave it alone. *If IE users are used to seeing that,
and it suddenly changes, they might be confused and think something is
wrong.

No. With the style I am using it looks totally wrong.

URL? *

Again, you are trying to mess with the UA, the way the UA works to be
specific. *I wouln't mind having a differently colored car, with other
features, but if suddenly my car is braking a different way than it
usually does, I'm going to be worried.

I'm behind a corporate firewall at the moment so can't post examples.
But imagine on any UI if you pushed a button, and afterwards the
button stayed "pressed" down.

It would look like it was stuck or the application had crashed.

Quote:
I don't use IE, but if I did, I would be used to that kind of behaivor,
and be assured that I had infact clicked on something. *Without that, I
might keep on clicking or something.
:visited is for links that have been clicked.
:focus is for links that have focus.
:active is for links that are currently being clicked.

I'm not using active in any weird, non-standard way. It's exactly how
it says it should behave in the spec.

Looks like it'll have to be javascripted...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.