Hi Guys
I have display images in my webpage and these image will be change on over image click. Problem is that, when user click (mostly continue) on image for change, image's background (in blue color) are selected in every browser.
This problem will be same for checkbox, dropdown, radio button and any clickable control . This is very irritable. Please help me!
Thanks
AVADHESH PATEL
26-Feb-2013Hi Royce!
Use below css, that prievnt to select background on click. use "unselectable" class where you control are difine.
.unselectable
{
-webkit-user-select: none;
-khtml-user-drag: none;
-khtml-user-select: none;
-moz-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
way of using
<div class="unselectable">
<input type="checkbox" id="chk" style="width: 25px; height: 25px; background-color:#E5E5E5;" />
<label for="chk" id="lblChk" style="vertical-align:super;">
Product</label>
</div>