I have text in a tag:
Hello world... and goodbye mind A B!
How do I increase the area in which the te
I'm assuming the scenario where you have a body of text, and inside that body of text is a fairly important or relevant piece of information to an end user and you would like them to be able to easily highlight and copy the information.
This would be considered as a last option if no other solution was found,
BLAH BLAH BLAH This is the information you would like users to be able to highlight BLAH BLAH BLAH BLAH ETC ETC ETC
If you wrap the text around it in separate paragraph tags and give them a class then set the following in CSS:
.surroundingText {
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
user-select: none;
}
.importantText {
-webkit-user-select: all; /* Chrome all / Safari all */
-moz-user-select: all; /* Firefox all */
-ms-user-select: all; /* IE 10+ */
user-select: all;
}
So the end result is only the text between the span tag is able to be selected.