E-mail List Archives
Re: Firefox vs. IE - dotted outline to show element in focus
From: William Lawrence
Date: Oct 12, 2010 9:27AM
- Next message: steven: "Re: Firefox vs. IE - dotted outline to show element in focus"
- Previous message: William Lawrence: "Re: using pixels for text"
- Next message in Thread: steven: "Re: Firefox vs. IE - dotted outline to show element in focus"
- Previous message in Thread: Jukka K. Korpela: "Re: Firefox vs. IE - dotted outline to show element in focus"
- View all messages in this Thread
Amanda,
> I see that the <LI> has "outline-style: none". I'm assuming that's what
> Steve is referring to.
In the CSS of the site, it is best to add a :focus pseudo-class
selector to any declaration that is already specifying the :hover
pseudo-class selector. For example, if the scope of the design
specifies the following CSS:
a:hover { background-color: #000; color: #fff; text-decoration: underline; }
The add the :focus pseudo-class selector as such:
a:focus, a:hover { background-color: #000; color: #fff;
text-decoration: underline; }
OR
a:focus { background-color: #fff; color: #000; outline:1px solid #000 }
a:hover { background-color: #000; color: #fff; text-decoration: underline; }
OR
The opportunities for controlling the presentation of your focus
management are endless.
There are different ways in which it may be written and ordered in the
CSS which you're working, however don't be afraid to specify :focus
for every focusable element. It is in the :focus pseudo-class selector
that you will be able to control the presentation of the outline of
the links in your "tab bar" navigation.
For further reading, an esteemed member of this list wrote a bit about
it awhile back:
http://24ways.org/2009/dont-lose-your-focus
There are other resources as well: http://www.delicious.com/tag/focus+css
Cheers!
William
- Next message: steven: "Re: Firefox vs. IE - dotted outline to show element in focus"
- Previous message: William Lawrence: "Re: using pixels for text"
- Next message in Thread: steven: "Re: Firefox vs. IE - dotted outline to show element in focus"
- Previous message in Thread: Jukka K. Korpela: "Re: Firefox vs. IE - dotted outline to show element in focus"
- View all messages in this Thread