Click to See Complete Forum and Search --> : Form Focus
robindean
04-18-2007, 02:40 PM
In Safari and many other browsers, when I click on a form on my site, it highlights that form.
I've already applied :focus {-moz-outline-style: none;} to the master css but dropdown menus and input boxes still "focus" upon cursor placement.
Is there a way for me to remove this feature with css?
gil davis
04-18-2007, 06:56 PM
Do you mean the dotted line around the object?
You can use js:onfocus="this.blur()"but keep in mind that this will adversely affect accessibility. Some people rely on that visual cue to know where the cursor is.
robindean
04-18-2007, 07:33 PM
Thanks for the code. Unfortunately your code renders my dropdown menus completely non-functional. I click on them and they won't even list the options to be selected.
Is there a one-time renderred, universal method (via script or css) by which all of my forms lose the onFocus border?
gil davis
04-19-2007, 07:13 AM
I meant to add the onfocus to each field separately.
I think you can add onfocus="return"to the dropdowns to override whatever you did globally.