views:

208

answers:

4

Hey guys,

does anybody know how to disable or manipulate the (in most browsers) dashed border of a dom-element if it has the focus in a tabindex order? i want to build my own style for a focused element but it would be great to use the exixsting feature -because with tabindex it is possible to bind keydown event to the dom-element ...

you know what i mean?

thanks and regards

A: 

Using jQuery you can do

$("#nav li a").focus(function(){
  $(this).blur();
});
Kaaviar
with blur i lose the focus, isn't it?so i cannot bind keydown event as well as mousewheel ...
helle
Right, didn't get the whole question ;)
Kaaviar
+3  A: 

Just make a CSS rule for the elements you want that have outline:none;

Gaby
omg didn't know that. thanks!
helle
@helle :) that is what *stackoverflow* is all about .. learning new things ;)
Gaby
@gaby ... i'm working with css for so long. never needed that until now ... lol
helle
@helle, yeah i know ... i too have never used it .. but it was in the back of my head .. either I read it somewhere or just played with it in the past..
Gaby
A: 

input::-moz-focus-inner { border: 0; }

Mayur bhalgama
A: 

CSS trick:

:focus { outline: none; }
goker.cebeci