3

Whenever I select an element in Internet Explorer, dotted lines appear around it, almost like a border. Is there anyway to disable this?

CallumVass
  • 11,288
  • 26
  • 84
  • 154
  • What do you mean by "select"? Are you selecting a form element, or text, or a DOM element using the developer tools, or something else? – Blazemonger Jan 18 '12 at 14:37
  • Try `*:focus { outline: 0 !important; }` but if it works, it'd only work in IE8+. – duri Jan 18 '12 at 14:37

2 Answers2

10

In your css:

a {
  outline: none;
  border: none; /* eventually, IE specific, not sure */
}
pdu
  • 10,295
  • 4
  • 58
  • 95
  • 2
    What do you mean by 'Eventually'? Why haven't you included `border:none` in your code? – Curtis Jan 18 '12 at 14:38
  • Ahh ofcourse! outline, cheers that solved it! – CallumVass Jan 18 '12 at 14:39
  • 1
    @curt because I am not sure if IE needs border: none; or if it works without. I have included it in my answer, but because you ask **so politely**, i will add it into the code part, just for you. – pdu Jan 18 '12 at 14:40
2

Blockquote Try *:focus { outline: 0 !important; } but if it works, it'd only work in IE8+.

This will delete borders around inputs if you apply to all (*). So make sure you also declare a border for inputs and textareas.

AshAndrien
  • 148
  • 1
  • 1
  • 7