#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    26
    Rep Power
    0

    Disable Safari Field Highlighting


    I would like to prevent safari from highlighting the field that has focus. Is this possible?

    I'm doing a similar effect on my site and it looks bad when they are combined.

    Thanks
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    2,999
    Rep Power
    1227
    Safari uses focus and outline on the form control elements to create that effect.

    You can use this to change the behaviour.
    Code:
    input:focus {
      outline:0 none;
    }
    Last edited by Akh; July 21st, 2009 at 03:58 AM.
  4. #3
  5. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,262
    Rep Power
    1960
    You can study Safari's default stylesheet here. See line 559 et seq.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    26
    Rep Power
    0
    Awesome, thanks guys!
  8. #5
  9. Eager to learn
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2009
    Location
    Maryland, USA
    Posts
    2,223
    Rep Power
    2184
    But in the end the user has the final choice. If they have it as !important to have the outline then you can't do anything about it. The user has the highest importance so even if you put !important in there it won't make one bit of difference.

    Also, Chrome does this too, don't you want to get rid of that too? Or do you not count us in your market

    Cheers
    besides them being on the same rendering engine..
    "Quality of responses may vary. I reserve the right to change my mind for any reason what-so-ever without admitting I was wrong. I'd prefer to change your mind however, it's easier on my ego". - jwdonahue

    "so no-one has actually bothered to post an original quote ? what's wrong with making up your own?"
    - marnixR

IMN logo majestic logo threadwatch logo seochat tools logo