How to make this input field unselectable? I have tried this but i can still select the text:
input {
border-radius: 10px;
width: 100%;
padding: 6px 20px;
margin: 2px 0;
box-sizing: border-box;
border: 2px solid #555;
outline: none;
}
input:focus {
border-radius: 10px;
border: 2px solid #555;
border-color: red;
}
div.capbg1 {
user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
<div class="capbg1">
<input type="text" class="form-control2 pull-right" value="<?php echo $capcode2;?>" name="captcha" style="width: 29%;" disabled>
</div>
When i put the text in the div without the input field it works. What am i doing wrong here?