Ben McCann
Ben McCann

Reputation: 19014

Weird outline when clicking contentEditable div

I'm trying to create a textarea that can contain multiple colors. I created a div and in JS did the following:

element.unselectable = 'off';
element.contentEditable = true;

The div is now editable, but when I click in it, it gets a weird outline. How do I turn this off? alt text http://www.benmccann.com/test/contentEditable.png

Upvotes: 3

Views: 1511

Answers (1)

Mickel
Mickel

Reputation: 6706

Try to set the outline-property in your CSS to "none":

<style type="text/css">
    * { outline: none; }
</style>

Upvotes: 4

Related Questions