Reputation: 13
<div class="drop-menu">
<div class="drop-menu-header"><i class="fal fa-bell"></i> Notifications</div>
<div class="drop-menu-item"> <a href="#" data-toggle="modal" data-target="#exampleModal" id="462">
Date of Birth: <b>2017-08-30</b><br>
Father: <b>KULDEEP SINGH</b>
Mother: <b>SUKHDEEP KAUR</b>
</a> </div>
<div class="drop-menu-item"> <a href="#" data-toggle="modal" data-target="#exampleModal" id="466">
Date of Birth: <b>2018-08-22</b><br>
Father: <b>SANJU</b>
Mother: <b>ALKA</b>
</a> </div>
<div class="drop-menu-item"> <a href="#" data-toggle="modal" data-target="#exampleModal" id="565">
Date of Birth: <b>2016-12-10</b><br>
Father: <b>RAVINDER SINGH</b>
Mother: <b>SUKHPAL KAUR</b>
</a> </div>
in this code last-child not working. how can i setup css for this code i'm new to html and css
Upvotes: 0
Views: 54
Reputation: 86
You can use :last-of-type selector.
.drop-menu-item:last-of-type {
/* your styles */
}
Upvotes: 2