blog

Stop HTML Objects Being Highlighted on Multiple/Double Click

blog

Author:Rowan Burgess

  • 13 Feb 2021
  • 20 minutes

Useful if you’re making a div into a button, for example. Stop the browser from selecting/highlighting a HTML object that is clicked multiple times in succession.


     -webkit-user-select: none; /* Chrome/Safari */        
     -moz-user-select: none; /* Firefox */
     -ms-user-select: none; /* IE10+ */

     /* Not implemented yet */
     -o-user-select: none;
     user-select: none;
                     
bg-banner-white
  • Let’s talk about how I can help you