tags:

views:

40

answers:

1

I'm running Mac OS so I can't really tell if this effect is presented on windows machines or not, so I apologize if this effect is not seen for you.

Input and TextFields seem to have a blue rectangle when focused, atleast on Firefox and Chrome on a Mac. I have a custom focus effect on a site, and I'm wondering if I can avoid having this default selection behavior show. Google avoids it on their site. I went as far as to get the 'in-effect' CSS style for Google's input box, apply that to my css object. However, it still shows the blue rectangle. I'm not exactly sure what kind of voodoo google is doing, but it seems to me that it's neither HTML or CSS attributes. Anyone know how to avoid this effect? Thanks!

+2  A: 

It is in fact a CSS attribute. This will hide that glowing effect:

input:focus, textarea:focus {
    outline: none;
}
BoltClock
I've used this before, too.. Doh. Thanks alot.. (Works brilliantly)
Kyle
Keep in mind that this is a browser usability feature. Users, especially keyboard-centric users, like knowing where the focus is before typing. If you remove this behavior, consider providing other ways to indicate focus for the user.
Doug