Frage

I really like the concept of using div elements as buttons. Above all the complete freedom of styling it is a real benefit in my opinion to do so.

The problem I got now is following: in a little project of mine I have a section where a user can input some values in order to store this data. Such a single input element containing input fields and other input elements is used to record one bill. In order to allow the user to input more than one bill, I've made a div based button which adds one further input element per click.

enter image description here

Now, let's say a user wants to record 8 bills, he will click 7 times on this button, and this in a fast manner. You know that if you double click text, it gets marked, which results in a very ugly appearance of the button.

enter image description here

Is there any way to set a div attribute for ''text not markable''? I'd really love to solve this without images.

War es hilfreich?

Lösung

From this very site:

#yourTable {
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

Credit goes here. Remember that IE won't always care, either.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top