Reputation: 4170
Example image from reddit.com
Picture sums up what I want to do with CSS (and JS if needed)
Essentially:
How would I do this purely with CSS (am using chrome stylish plugin) and if needed Javascript?
Currently I was using this:
pointer-events: none;
on the CSS class
but this disables the ability to have a right-click context menu
Upvotes: 0
Views: 1830
Reputation: 654
Use this: <IMG border=0 src="..." oncontextmenu="return false;">
Demo here: http://www.javascripter.net/faq/rightbu2.htm
Upvotes: 1
Reputation: 1300
I am not sure if you could do this with CSS only. To accomplish this with JS, try the following code:
<a href="#link" onclick="event.preventDefault();">
<img src="img.jpg"/>
</a>
Upvotes: 2