Is there a way to make CSS understand that clicking on a child element within the parent should not be considered as clicking on the parent as well? Why not give it a try by clicking on one of the children inside the parent?
.parent{
background: blue;
padding:20px;
text-align: center;
margin: 0 auto;
height: 300px;
width: 300px;
}
.parent:active{
background: #ddd;
}
.child{
background: red;
float: left;
padding: 5px;
height: 150px;
width: 150px;
font-size: 4em;
}
.child:nth-child(odd){
background: pink;
}
<div class="parent">
<div class="child">Click me</div>
<div class="child">Click me</div>
</div>