I have created a button CSS class that uses background images with different positions to display a different image on normal, mouseover, and click states. One thing completely destroying the visual effect is that if I click such a link repeatedly and move the mouse just a pixel, the link text gets selected.
Is there a way to achieve the effect of
onselectstart = "return false;"
without having to specify that for each button? A CSS based solution would be perfect, but I can't think of one. Any ideas?
One way would be iterating through each "button" element using prototype or JQuery and setting the onselectstart event manually. However I am allergic to Javascript when not absolutely necessary, and would appreciate any non-JS ideas.
Edit: I have found a solution for Mozilla browsers:
-moz-user-select:none;