0

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...

GeekMasher
  • 1,066
  • 2
  • 11
  • 17

1 Answers1

2

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;
}
mas-designs
  • 7,498
  • 1
  • 31
  • 56