Reputation: 1086
I'm trying to stop my <div>
's text from highlighting when I click on it multiple time (it's a button). I know that there is a solution but I just don't know it. This is a simple and easy question to answer.
<div id="Button01">Time?</div>
And yes, I know it's a stupid question to ask...
Upvotes: 0
Views: 823
Reputation: 7536
when it's a div it can't be a button. When you click some text multiple times is a standard behaviour the text gets highlighted.
There is some code I found on SO
div{
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
Upvotes: 2