here is my html
.user-container div.user-left:last-child{
color:red;
}
.user-container div.user-right:last-child{
color:red;
}
<div class="user-container">
<div class="user user-left">Some text.</div>
<div class="user user-left">Some text.</div>
<div class="user user-left">Some text.</div>
<div class="user user-left">Some text.</div>
<div class="user user-left">Some text. this is user left last</div>
<div class="user user-right">Some text.</div>
<div class="user user-right">Some text.</div>
<div class="user user-right">Some text.</div>
<div class="user user-right">Some text. this is user right last</div>
</div>
is there any way to change font color of last child of class 'user-left' and class 'user-right' using CSS ? in here user-right:last-child working but user-left:last-child not working.any idea?