I've got a block(div) which contains select tag, button tag and etc. I need a solution to specify this block to "readonly" property. using css or js+css, which means that a content of this block will not be either clickable or selectable.
Thanx
I've got a block(div) which contains select tag, button tag and etc. I need a solution to specify this block to "readonly" property. using css or js+css, which means that a content of this block will not be either clickable or selectable.
Thanx
use for this block:
div {
position: relative;
z-index: -1:
}
simplest would be to add a layer on top of it --
with css
#divid { pointer-events: none; }
Update:
<div id="wrapper">
<input type="button" value="test" onclick="javascript: alert(1);" />
</div>
css
#wrapper { pointer-events: none; }
Try this:
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;