Is it possible to suppress parent's :active pseudo class?

Symndoolo

New Member
I have the following markup:\[code\]<div class="parent"> I should change my color to green when clicked <div class="element">I should do nothing when clicked</div></div>\[/code\]Here is the related CSS:\[code\].parent { width:200px; height:200px; background: red; color: #fff;}.parent:active { background:green;}.element { background:blue;}\[/code\]Is there any way to prevent triggering \[code\].parent\[/code\]'s \[code\]:active\[/code\] pseudo class when \[code\].element\[/code\] is clicked? Tried \[code\]e.stopPropogation()\[/code\] when \[code\].element\[/code\] is clicked with no luck.demo
 
Back
Top