By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

*:focus { outline: none }

P: n/a
Hi,

I'm posting in this forum for the first time so if I break any conventions
or protocols I'm sorry.

I've attached this style:

*:focus { outline: none }

to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.

http://www.arvonfoundation.org/test/new_index5.htm is the page with the
style attached.

http://www.arvonfoundation.org/test/...main_style.css is the
stylesheet.

Thanks for any help.

Chris Bradbury
Jul 20 '05 #1
Share this Question
Share on Google+
20 Replies


P: n/a
Chris Bradbury wrote:
Hi,

I'm posting in this forum for the first time so if I break any conventions
or protocols I'm sorry.

I've attached this style:

*:focus { outline: none }

to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.

http://www.arvonfoundation.org/test/new_index5.htm is the page with the
style attached.

http://www.arvonfoundation.org/test/...main_style.css is the
stylesheet.

Thanks for any help.

Chris Bradbury


AFAIK, this is not supported. Perhaps Safari does support it, but I
can't test it at the moment.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

P: n/a
in post <news:40******@212.67.96.135>
Chris Bradbury said:
I've attached this style:
*:focus { outline: none }
to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.


why do you want to make it more difficult for people to navigate your
site?

--
brucie
Jul 20 '05 #3

P: n/a
Hi Anne,

A colleague has used it with no problem. I also found this info which seems
to suggest it's supported:

http://www.phpfreaks.com/css_manual/...namic-outlines

Also tried this different approach:

http://www.liquidpulse.net/code/129

but...didn't work!

TIA
Chris

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bt**********@reader11.wxs.nl...
Chris Bradbury wrote:
Hi,

I'm posting in this forum for the first time so if I break any conventions or protocols I'm sorry.

I've attached this style:

*:focus { outline: none }

to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.

http://www.arvonfoundation.org/test/new_index5.htm is the page with the
style attached.

http://www.arvonfoundation.org/test/...main_style.css is the stylesheet.

Thanks for any help.

Chris Bradbury


AFAIK, this is not supported. Perhaps Safari does support it, but I
can't test it at the moment.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>

Jul 20 '05 #4

P: n/a
It's not that, the client wants them gone and the client is GOD...

Chris

"brucie" <sh**@bruciesusenetshit.info> wrote in message
news:bt************@ID-117621.news.uni-berlin.de...
in post <news:40******@212.67.96.135>
Chris Bradbury said:
I've attached this style:
*:focus { outline: none }
to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.


why do you want to make it more difficult for people to navigate your
site?

--
brucie

Jul 20 '05 #5

P: n/a
"Chris Bradbury" <cj********@dial.pipex.com> wrote:
"brucie" <sh**@bruciesusenetshit.info> wrote in message
news:bt************@ID-117621.news.uni-berlin.de...
in post <news:40******@212.67.96.135>
Chris Bradbury said:
> I've attached this style:
> *:focus { outline: none }
> to a page but it doesn't remove the dotted lines (surrounding links that
> have been 'hit') like it's supposed to.


why do you want to make it more difficult for people to navigate your
site?

It's not that, the client wants them gone and the client is GOD...


But is the client aware of the negative impact this will have on his
site? Has the client signed off on this, acknowledging that what he
wants is against your expert advice, and accepted all responsibility
for future costs that might arise as a result of following this
course?

Anyway, I'm fairly certain that :focus is supported by IE and I know
that outline: isn't so this solution definitely won't work for the
majority of user's out there.

Opera supports outline but uses highlighting not outline on the
currently selected link. Opera's support for :focus seems to be
patchy.

Mozilla supports :focus and it's own -moz-outline property, so
*:focus { -moz-outline: none } will work in Mozilla.

If the client is determined to screw any potential customers who
happen not to use a mouse to navigate web pages then you'll have to
use JavaScript methods to hide the focus rectangle.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
Steve Pugh <st***@pugh.net> wrote in
news:lk********************************@4ax.com:
If the client is determined to screw any potential customers who
happen not to use a mouse to navigate web pages then you'll have to
use JavaScript methods to hide the focus rectangle.


It's worth mentioning that there are many people who use a mouse for
general link/menu navigation but prefer to use the keyboard for navigating
between form elements (less hand-shifting when you're typing).
Jul 20 '05 #7

P: n/a
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post
brucie wrote
Chris Bradbury said:
I've attached this style:
*:focus { outline: none }
to a page but it doesn't remove the dotted lines (surrounding
links that have been 'hit') like it's supposed to.
why do you want to make it more difficult for people to navigate
your site?


Chris Bradbury wrote: It's not that,
Is *is* that. You are removing information that users are accustomed
to seeing, information that they use to figure out where they've been.
the client wants them gone and the client is GOD...


Tempting though it is to reply with smart-alec responses ("Does God
pay well? Could you ask him if he *does*, after all, play dice with
the universe? etc.), I'll stick to the topic.

The client has hired you to design a site. Presumably, this client
wants a site that visitors will find easy to use. You are the expert.
Isn't it your job to warn the client that their wish to remove
navigation hints (the focus outline) conflicts with the goal of
creating a functioning site?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #8

P: n/a
On Mon, 12 Jan 2004 15:51:33 -0000, Chris Bradbury
<cj********@dial.pipex.com> wrote:
It's not that, the client wants them gone and the client is GOD...


If I tell the architect I don't want any load-bearing walls on the first
floor, and no cross-beams and pillars because I don't like how they look,
is it the architect's duty to build me a house that will fall down, or to
politely tell me that I'm an idiot and to let him do the job I'm paying
him to?

Biggest problem with web authoring - too many forget that the structure is
more important than the presentation.
Jul 20 '05 #9

P: n/a
Top-posting corrected; please have a quick read of
http://www.xs4all.nl/~sbpoley/toppost.htm
On Mon, 12 Jan 2004 15:51:33 -0000, "Chris Bradbury"
<cj********@dial.pipex.com> wrote:
"brucie" <sh**@bruciesusenetshit.info> wrote in message
news:bt************@ID-117621.news.uni-berlin.de...
in post <news:40******@212.67.96.135>
Chris Bradbury said:
> I've attached this style:
> *:focus { outline: none }
> to a page but it doesn't remove the dotted lines (surrounding links that
> have been 'hit') like it's supposed to.
why do you want to make it more difficult for people to navigate your
site?

It's not that, the client wants them gone and the client is GOD...

Gently point out to the client that visitors may decide not to believe
in him ...

The outline is there for a reason, and some people will find the site
very difficult (even impossible) to use without it. Try navigating the
site using the keyboard. Oh, and by the way - you do know that not all
browsers use a dotted outline, don't you?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #10

P: n/a
DU
Chris Bradbury wrote:
It's not that, the client wants them gone and the client is GOD...

Chris

"brucie" <sh**@bruciesusenetshit.info> wrote in message
news:bt************@ID-117621.news.uni-berlin.de...
in post <news:40******@212.67.96.135>
Chris Bradbury said:

I've attached this style:
*:focus { outline: none }
to a page but it doesn't remove the dotted lines (surrounding links that
have been 'hit') like it's supposed to.


why do you want to make it more difficult for people to navigate your
site?

--
brucie


AFAIK, outline is only supported by Opera 7.x and there are redraw,
repaint issues/matters with dynamic pseudo-classes like :focus and
:active. And button does not support well the pseudo-class :focus... at
least not extremely well.

We've been over this issue before in another newsgroup (alt.html) and it
was answered completely. At the end, after hearing all the arguments,
the original poster decided not to try to remove those dotted lines.

Efforts to remove these lines can not be assured because browser
manufacturers have to comply with accessibility guidelines and laws
involving people with disabilities. In the end, users could force these
lines (user stylesheets, user prefs settings, userContent.css, etc.); at
least they can in Opera 7.x and Mozilla-based browsers.

Just tell your boss that it is in his best objective interests to leave
these lines as they are. If you need more arguments, just ask in here:
there are plenty of good arguments for those dotted lines.
- improved recognition of the last element which last had focus or was
active
- keyboard navigation greatly increased (visual feedback)
- possible lawsuit for making a website harder to use for people with
disabilities

DU
Jul 20 '05 #11

P: n/a
"Stephen Poley" <sb******************@xs4all.nl> schrieb im Newsbeitrag
news:dr********************************@4ax.com...
Top-posting corrected; please have a quick read of
http://www.xs4all.nl/~sbpoley/toppost.htm

....
Oh, and by the way - you do know that not all
browsers use a dotted outline, don't you?


Some draw a thick blue shadow (Mac IE 5) which is terribly ugly specially in
image maps.

The javascript code to remove it is <a href="page.htm"
onFocus="if(this.blur)this.blur()">.

Now that you have read lots of arguments about this issue you can decide if
you want to use it or not. As you have to insert the attribute into every
single element you can also use it in a differenciated way. I personally
never use it in form elements as they are quite likely to be accessed with
the keyboard, and I never use it in application-like sites anyway. But
sometimes - specially with image maps and things like that - it's just nice
to get rid of these lines.

--
Markus
Jul 20 '05 #12

P: n/a
Markus Ernst wrote:

But
sometimes - specially with image maps and things like that - it's just nice
to get rid of these lines.


As primarily a keyboard user, I couldn't disagree more.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #13

P: n/a
On Fri, 16 Jan 2004, Markus Ernst wrote:
Some draw a thick blue shadow (Mac IE 5) which is terribly ugly specially in
image maps.
Then make some adjustments to your *own* browser. Don't interfere
with usability features for your readers.
The javascript code to remove it is <a href="page.htm"
onFocus="if(this.blur)this.blur()">.
Another good reason for disabling javascript coming from untrusted
sites, then.
Now that you have read lots of arguments about this issue you can decide if
you want to use it or not.


Please decide for yourself - but do *not* presume to decide for your
readers.

Stylesheet proposals are fine, within some bounds of what is
reasonable; but sabotaging usability features of the user's browser
ipso facto goes beyond the bounds of what is reasonable, in my view.
Jul 20 '05 #14

P: n/a
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> schrieb im Newsbeitrag
news:Pi*******************************@ppepc56.ph. gla.ac.uk...
On Fri, 16 Jan 2004, Markus Ernst wrote:
Some draw a thick blue shadow (Mac IE 5) which is terribly ugly specially in image maps.


Then make some adjustments to your *own* browser. Don't interfere
with usability features for your readers.


I would never try to interfere with a usability setting that a user has set.
But unfortunately Microsoft decided to interfere with my design by adding
lines around every clicked link by default. As a huge mayority of visual
browser users access links with a mouse this is a quite invasive thing.

People who prefer to use the keyboard to click links are somehow a special
interest group (I don't know anybody). Other than average users, special
interest groups always care about adjusting browser settings. So it would be
the correct way to provide a visual focus on links as a setting, not as a
default. (I only talk about links, it's different with form elements.)
The javascript code to remove it is <a href="page.htm"
onFocus="if(this.blur)this.blur()">.


Another good reason for disabling javascript coming from untrusted
sites, then.
Now that you have read lots of arguments about this issue you can decide if you want to use it or not.


Please decide for yourself - but do *not* presume to decide for your
readers.

Stylesheet proposals are fine, within some bounds of what is
reasonable; but sabotaging usability features of the user's browser
ipso facto goes beyond the bounds of what is reasonable, in my view.


IMO web sites are made for several different reasons. Some are made mainly
for providing information, others for representation purposes, others even
stand for themselves as an art work. In my view the bounds of what is
reasonable is quite variable.

I appreciate this kind of discussion very much as sometimes I read arguments
I never thaught of before. Maybe the OP will now rather convince his client
of the reasonability of those borders he does not like. I am also convinced
that a good website must provide all the information regardless of your
browser settings. But specially if you have a client (who sees other pages
and wants his own to look better than his competitor's) it must also look
really good on an average browser with average settings. If you deny the
importance of representation you are not covering the whole of the web, but
only a part of it.
Jul 20 '05 #15

P: n/a
On Sun, 18 Jan 2004, Markus Ernst wrote:

[...]
If you deny the importance of representation you are not covering
the whole of the web, but only a part of it.


Sometimes, at the end of the day, those who are commissioning a web
site will not accept one's best advice, and one has to accept a
compromise (unless the situation is crass enough to want to walk away
from). That's the way things are. But it isn't going to stop me from
offering best advice to the next one who asks, and offering it here
too if the question is raised.

I don't accept your accusation that I "deny the importance of
representation". But I -do- try to give priority to the end user.

As a general comment without any specific relevance to the current
issue of detail, but:

Sometimes I think that many commercial web sites have been designed
primarily for initimidating their competitors (popularly known as
"pissing around the boundaries of the territory"), without any clear
consideration for those who actually want to _use_ the pages, i.e
their customers and potential customers.

Some of them even have concealed or hard-to-find back doors for
customers to bypass the intimidation, and actually get to the content.
Often, one only finds those back doors by talking to their support
staff: I'm naming no names, but I have several companies in mind that
we need to cope with day by day.
Jul 20 '05 #16

P: n/a
Markus Ernst wrote:

unfortunately Microsoft decided to interfere with my design by
adding lines around every clicked link by default.
Microsoft do lots of dumb things. Adding a border around visited links
when the user goes back in the history is not one of them. It adds
information that a user may come to rely on.
As a huge mayority of visual browser users access links with a
mouse this is a quite invasive thing.
How is that "invasive?"
People who prefer to use the keyboard to click links are somehow a
special interest group (I don't know anybody).


Hello. My name is Brian. Now you do know somebody who uses the
keyboard. Not exclusively. I have a mouse. But I also suffer from
carpal tunnel syndrome, and sometimes must resort to the keyboard.

--
Brian
http://www.tsmchughs.com
follow the directions in my address to email me

Jul 20 '05 #17

P: n/a
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> schrieb im Newsbeitrag
news:Pi*******************************@ppepc56.ph. gla.ac.uk...
On Sun, 18 Jan 2004, Markus Ernst wrote:

[...]
If you deny the importance of representation you are not covering
the whole of the web, but only a part of it.
Sometimes, at the end of the day, those who are commissioning a web
site will not accept one's best advice, and one has to accept a
compromise (unless the situation is crass enough to want to walk away
from). That's the way things are. But it isn't going to stop me from
offering best advice to the next one who asks, and offering it here
too if the question is raised.


I highly appreciate that.
I don't accept your accusation that I "deny the importance of
representation". But I -do- try to give priority to the end user.
Yes I did not meant to accuse you - that sencence might have been more
inspired by former discussions on this topic than by your posting, and I
apologize.
As a general comment without any specific relevance to the current
issue of detail, but:

Sometimes I think that many commercial web sites have been designed
primarily for initimidating their competitors (popularly known as
"pissing around the boundaries of the territory"), without any clear
consideration for those who actually want to _use_ the pages, i.e
their customers and potential customers.

Some of them even have concealed or hard-to-find back doors for
customers to bypass the intimidation, and actually get to the content.
Often, one only finds those back doors by talking to their support
staff: I'm naming no names, but I have several companies in mind that
we need to cope with day by day.

Jul 20 '05 #18

P: n/a
"Brian" <us*****@julietremblay.com.invalid-remove-this-part> schrieb im
Newsbeitrag news:X8IOb.81193$Rc4.291690@attbi_s54...
Markus Ernst wrote:

unfortunately Microsoft decided to interfere with my design by
adding lines around every clicked link by default.


Microsoft do lots of dumb things. Adding a border around visited links
when the user goes back in the history is not one of them. It adds
information that a user may come to rely on.
As a huge mayority of visual browser users access links with a
mouse this is a quite invasive thing.


How is that "invasive?"
People who prefer to use the keyboard to click links are somehow a
special interest group (I don't know anybody).


Hello. My name is Brian. Now you do know somebody who uses the
keyboard. Not exclusively. I have a mouse. But I also suffer from
carpal tunnel syndrome, and sometimes must resort to the keyboard.

--
Brian
http://www.tsmchughs.com
follow the directions in my address to email me


Hello Brian, nice to meet you :-)

I had a look at the tsmchughs.com. I was not aware of the possibility of
a:focus and I like the way you implemented it. Actually I was not aware of
the importance of accessibility features on visual browsers either, as I
thaught if a page was accessible with a non-javascript text-only browser it
was perfectly accessible to everybody.

--
Markus
Jul 20 '05 #19

P: n/a
On Sun, 18 Jan 2004 17:11:25 +0100, "Markus Ernst"
<derernst@NO#SP#AMgmx.ch> wrote:
People who prefer to use the keyboard to click links are somehow a special
interest group (I don't know anybody).


Pleased to meet you. That's at least two of us just in this thread.
As it is commonly recommended to use keyboard rather than mouse where
possible to reduce the risk of RSI, the number of people who prefer to
use the keyboard is certainly large and increasing.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #20

P: n/a
Markus Ernst wrote:
Brian schrieb im Newsbeitrag news:X8IOb.81193$Rc4.291690@attbi_s54...
http://www.tsmchughs.com
I had a look at the tsmchughs.com. I was not aware of the
possibility of a:focus and I like the way you implemented it.


Thank you. For others who might be curious, there's no magic at work
on that site. I simply add a:focus to declarations for a:hover, e.g.,

a:hover, a:focus {
color: #00c;
background-color: #555;
}
Actually I was not aware of the importance of accessibility
features on visual browsers either, as I thaught if a page was
accessible with a non-javascript text-only browser it was perfectly
accessible to everybody.


Some features such as using correct markup, consistent navigation,
etc., do overlap. There are some things that are extra, but such
extras are often trivial to add, including a:focus. I've lifted some
ideas from others in ciwas, too. The contact form offers some visual
cues on :focus. I got that from David Dorward's site.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.