Answer the question
In order to leave comments, you need to log in
Why is text highlighted inside an absolute block?
Recorded GIF https://i.imgur.com/hCvh8l7.gifv
.relative {
position: relative;
}
.absolute {
position: absolute;
top: 300px;
z-index: 100;
}
.cart {
text-align: left;
background-color: white;
padding: 15px;
width: 230px;
height: auto;
margin-top: 0;
box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.20);
}
Answer the question
In order to leave comments, you need to log in
Wrap the icon in a button, hang an event on the button and remove all styles from it:
button {
background-color: transparent;
border: none;
outline: none;
}
Try disabling selection
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
-webkit-user-select: none;
user-select: none;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question